Class: ActiveScaffold::Config::Mark
- Defined in:
- lib/active_scaffold/config/mark.rb
Constant Summary collapse
- @@mark_all_mode =
:search
Instance Attribute Summary collapse
-
#mark_all_mode ⇒ Object
Returns the value of attribute mark_all_mode.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(core_config) ⇒ Mark
constructor
A new instance of Mark.
Methods inherited from Base
#crud_type, #formats, #formats=, inherited
Methods included from ActiveScaffold::Configurable
Constructor Details
#initialize(core_config) ⇒ Mark
Returns a new instance of Mark.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/active_scaffold/config/mark.rb', line 13 def initialize(core_config) @core = core_config @mark_all_mode = self.class.mark_all_mode if core_config.actions.include?(:update) @core.model.send(:include, ActiveScaffold::MarkedModel) unless @core.model.ancestors.include?(ActiveScaffold::MarkedModel) add_mark_column else raise "Mark action requires update action in controller for model: #{core_config.model.to_s}" end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ActiveScaffold::Configurable
Instance Attribute Details
#mark_all_mode ⇒ Object
Returns the value of attribute mark_all_mode.
11 12 13 |
# File 'lib/active_scaffold/config/mark.rb', line 11 def mark_all_mode @mark_all_mode end |