Module: MetaMagic::Controller
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/meta_magic/controller.rb
Instance Method Summary collapse
- #get_model_class ⇒ Object
- #get_model_instance_variable ⇒ Object
- #set_model_instance_variable ⇒ Object
Instance Method Details
#get_model_class ⇒ Object
15 16 17 |
# File 'lib/meta_magic/controller.rb', line 15 def get_model_class controller_name.classify.constantize end |
#get_model_instance_variable ⇒ Object
7 8 9 |
# File 'lib/meta_magic/controller.rb', line 7 def get_model_instance_variable instance_variable_get(:"@#{ controller_name.classify.underscore.downcase }") end |
#set_model_instance_variable ⇒ Object
11 12 13 |
# File 'lib/meta_magic/controller.rb', line 11 def set_model_instance_variable send(:"set_#{ controller_name.classify.underscore.downcase }") end |