diff options
| author | Alban Peignier | 2018-04-15 20:53:26 +0200 | 
|---|---|---|
| committer | Alban Peignier | 2018-04-15 20:53:45 +0200 | 
| commit | dbecff41f8db17c2eb37fcb28a2a30b25d9a3738 (patch) | |
| tree | d8ff339414d4049727cdfef9f3c733c40ac6a236 /app/models/custom_field.rb | |
| parent | 4cfa4839012f52e87be7b44f54f8b03374046786 (diff) | |
| download | chouette-core-dbecff41f8db17c2eb37fcb28a2a30b25d9a3738.tar.bz2 | |
Remove CustomField :for_workgroup scope (use Workgroup#custom_fields)
Diffstat (limited to 'app/models/custom_field.rb')
| -rw-r--r-- | app/models/custom_field.rb | 4 | 
1 files changed, 0 insertions, 4 deletions
| diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index 22118a15a..65eabb205 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -7,10 +7,6 @@ class CustomField < ApplicationModel    validates :name, uniqueness: {scope: [:resource_type, :workgroup_id]}    validates :code, uniqueness: {scope: [:resource_type, :workgroup_id], case_sensitive: false}, presence: true -  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=:all        vals = object.class.custom_fields(workgroup).map do |v| | 
