Class: ActiveScaffold::Config::Subform
- Defined in:
- lib/active_scaffold/config/subform.rb
Constant Summary collapse
- @@layout =
:horizontal
Instance Attribute Summary collapse
-
#layout ⇒ Object
instance-level configuration —————————-.
Attributes inherited from Base
Instance Method Summary collapse
-
#columns ⇒ Object
provides access to the list of columns specifically meant for the Sub-Form to use.
-
#initialize(core_config) ⇒ Subform
constructor
A new instance of Subform.
Methods inherited from Base
#crud_type, #formats, #formats=, inherited, #label
Methods included from ActiveScaffold::Configurable
Constructor Details
#initialize(core_config) ⇒ Subform
Returns a new instance of Subform.
3 4 5 6 |
# File 'lib/active_scaffold/config/subform.rb', line 3 def initialize(core_config) super @layout = self.class.layout # default layout end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ActiveScaffold::Configurable
Instance Attribute Details
#layout ⇒ Object
instance-level configuration
17 18 19 |
# File 'lib/active_scaffold/config/subform.rb', line 17 def layout @layout end |
Instance Method Details
#columns ⇒ Object
provides access to the list of columns specifically meant for the Sub-Form to use
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/active_scaffold/config/subform.rb', line 20 def columns # we want to delay initializing to the @core.update.columns set for as long as possible. but we have to eventually clone, or else have a configuration "leak" unless @columns if @core.actions.include? :update @columns = @core.update.columns.clone else self.columns = @core.columns._inheritable end end @columns end |