app/models/fields/field.rb in fat_free_crm-0.18.2 vs app/models/fields/field.rb in fat_free_crm-0.19.0
- old
+ new
@@ -32,11 +32,11 @@
acts_as_list
serialize :collection, Array
serialize :settings, HashWithIndifferentAccess
- belongs_to :field_group
+ belongs_to :field_group, optional: true # TODO: Is this really optional?
scope :core_fields, -> { where(type: 'CoreField') }
scope :custom_fields, -> { where("type != 'CoreField'") }
scope :without_pairs, -> { where(pair_id: nil) }
@@ -102,11 +102,9 @@
value.select(&:present?).in_groups_of(2, false).map { |g| g.join(', ') }.join("<br />".html_safe) if Array === value
else
value.to_s
end
end
-
- protected
class << self
# Provides access to registered field_types
#------------------------------------------------------------------------------
def field_types