Class: ActiveAdmin::Cms::Recipe::Section
- Inherits:
-
Object
- Object
- ActiveAdmin::Cms::Recipe::Section
- Defined in:
- lib/active_admin/cms/recipe/section.rb
Direct Known Subclasses
ActiveAdmin::Cms::Recipes::SectionHelper::SectionContainer::Section
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#options ⇒ Object
Returns the value of attribute options.
Attributes included from ActiveAdmin::Cms::Recipes::SectionHelper::SectionContainer
Instance Method Summary collapse
-
#initialize(id, opts = {}, &block) ⇒ Section
constructor
A new instance of Section.
- #section(id, opts = {}, &block) ⇒ Object
Methods included from ActiveAdmin::Cms::Recipes::SectionHelper::SectionContainer
#add_fields_to, #admin_fieldset_title, #ingredient, #ingredients, #method_missing, #section_id, #section_key, #sections
Constructor Details
#initialize(id, opts = {}, &block) ⇒ Section
Returns a new instance of Section.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/active_admin/cms/recipe/section.rb', line 12 def initialize(id, opts={}, &block) #debugger opts[:partial] ||= 'cms/recipes/section' opts[:class] ||= '' @id = id @options = opts if block self.instance_eval &block end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ActiveAdmin::Cms::Recipes::SectionHelper::SectionContainer
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'lib/active_admin/cms/recipe/section.rb', line 8 def id @id end |
#options ⇒ Object
Returns the value of attribute options.
8 9 10 |
# File 'lib/active_admin/cms/recipe/section.rb', line 8 def @options end |
Instance Method Details
#section(id, opts = {}, &block) ⇒ Object
27 28 29 30 31 |
# File 'lib/active_admin/cms/recipe/section.rb', line 27 def section(id, opts={}, &block) #super(id, opts) super sections[id].parent = self end |