Module: RivetCms::HasFields
- Extended by:
- ActiveSupport::Concern
- Included in:
- Component, ContentType
- Defined in:
- app/models/concerns/rivet_cms/has_fields.rb
Overview
Shared by content types and components. The fields association is soft-delete scoped (kept only), so dependent: :destroy would leave discarded fields holding the FK — destroy those explicitly on delete.
Instance Method Summary collapse
Instance Method Details
#active_fields ⇒ Object
17 18 19 |
# File 'app/models/concerns/rivet_cms/has_fields.rb', line 17 def active_fields fields end |
#all_fields ⇒ Object
13 14 15 |
# File 'app/models/concerns/rivet_cms/has_fields.rb', line 13 def all_fields fields.with_discarded end |
#discarded_fields ⇒ Object
21 22 23 |
# File 'app/models/concerns/rivet_cms/has_fields.rb', line 21 def discarded_fields fields.with_discarded.discarded end |