Class: ThumbleMonks::ThroughModelLoader
- Inherits:
-
AssociativeModelLoader
- Object
- ModelLoader
- AssociativeModelLoader
- ThumbleMonks::ThroughModelLoader
- Defined in:
- lib/thumblemonks/model_loader.rb
Overview
AssociativeModelLoader
Instance Attribute Summary
Attributes inherited from AssociativeModelLoader
#foreign_key, #load_through, #parameter_key
Attributes inherited from ModelLoader
#assigns_to, #except, #only, #requires
Instance Method Summary collapse
-
#initialize(name, opts = {}) ⇒ ThroughModelLoader
constructor
:nodoc.
Methods inherited from AssociativeModelLoader
Methods inherited from ModelLoader
#action_allowed?, #action_required?, #load_model
Constructor Details
#initialize(name, opts = {}) ⇒ ThroughModelLoader
:nodoc
67 68 69 70 71 |
# File 'lib/thumblemonks/model_loader.rb', line 67 def initialize(name, opts={}) super @load_through = "@#{opts[:through]}".to_sym @association = opts[:association] || name.to_s.pluralize end |