Class: ActiveScaffold::DataStructures::NestedInfoScope
- Inherits:
-
NestedInfo
- Object
- NestedInfo
- ActiveScaffold::DataStructures::NestedInfoScope
- Defined in:
- lib/active_scaffold/data_structures/nested_info.rb
Instance Attribute Summary
Attributes inherited from NestedInfo
#association, #child_association, #constrained_fields, #param_name, #parent_id, #parent_model, #parent_scaffold, #scope
Instance Method Summary collapse
-
#initialize(model, params) ⇒ NestedInfoScope
constructor
A new instance of NestedInfoScope.
- #name ⇒ Object
- #to_params ⇒ Object
Methods inherited from NestedInfo
#belongs_to?, get, #habtm?, #has_many?, #has_one?, #match_model?, #new_instance?, #plural_association?, #readonly?, #readonly_through_association?, #singular_association?, #sorted?, #through_association?
Constructor Details
#initialize(model, params) ⇒ NestedInfoScope
Returns a new instance of NestedInfoScope.
144 145 146 147 148 149 150 |
# File 'lib/active_scaffold/data_structures/nested_info.rb', line 144 def initialize(model, params) super @scope = params[:named_scope].to_sym @param_name = parent_model.name.foreign_key.to_sym @parent_id = params[@param_name] @constrained_fields = [] end |