diff options
| author | Zog | 2018-03-13 10:41:48 +0100 |
|---|---|---|
| committer | Johan Van Ryseghem | 2018-04-04 11:15:31 +0200 |
| commit | e1b6871272e81d038cac1e42129a2bb0ca8f3966 (patch) | |
| tree | 582f7aa3e11994d3613f99864334eb88cd622a14 | |
| parent | dc165132d3c9e5bd9a41f514a7f6f14d032ae2d8 (diff) | |
| download | chouette-core-e1b6871272e81d038cac1e42129a2bb0ca8f3966.tar.bz2 | |
Refs #6090; CustomFields inputs made easy
:warning: We'll have to refine this code once StopArea are linked to
workgroups
| -rw-r--r-- | app/models/custom_field.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index 1db351135..60aa25e85 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -9,6 +9,8 @@ class CustomField < ActiveRecord::Base scope :for_workgroup, ->(workgroup){ where workgroup_id: workgroup.id } + scope :for_workgroup, ->(workgroup){ where workgroup_id: workgroup.id } + class Collection < HashWithIndifferentAccess def initialize object, workgroup=nil vals = object.class.custom_fields(workgroup).map do |v| |
