Module: FatFreeCRM::Fields::SingletonMethods
- Defined in:
- lib/fat_free_crm/fields.rb
Instance Method Summary collapse
Instance Method Details
#field_groups ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/fat_free_crm/fields.rb', line 25 def field_groups if ActiveRecord::Base.connection.table_exists? 'field_groups' FieldGroup.where(:klass_name => self.name).order(:position) else [] end end |
#fields ⇒ Object
33 34 35 |
# File 'lib/fat_free_crm/fields.rb', line 33 def fields field_groups.map(&:fields).flatten end |
#serialize_custom_fields! ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/fat_free_crm/fields.rb', line 37 def serialize_custom_fields! fields.each do |field| if !serialized_attributes.keys.include?(field.name) and field.as == 'check_boxes' serialize(field.name.to_sym, Array) end end end |