Class: ViewModels::View
- Inherits:
-
ActionView::Base
- Object
- ActionView::Base
- ViewModels::View
- Defined in:
- lib/view_models/view.rb
Overview
View model specific view.
Instance Method Summary collapse
-
#find_template(path, second = nil) ⇒ Object
Rails 3 calls it with 2 arguments.
-
#initialize(controller, master_helper_module) ⇒ View
constructor
Include the helpers from the view model.
- #render_with(options) ⇒ Object
Constructor Details
#initialize(controller, master_helper_module) ⇒ View
Include the helpers from the view model.
13 14 15 16 |
# File 'lib/view_models/view.rb', line 13 def initialize controller, master_helper_module singleton_class.send :include, master_helper_module super controller.class.view_paths, {}, controller end |
Instance Method Details
#find_template(path, second = nil) ⇒ Object
Rails 3 calls it with 2 arguments
26 27 28 |
# File 'lib/view_models/view.rb', line 26 def find_template path, second=nil lookup_context.find_template path rescue nil end |
#render_with(options) ⇒ Object
20 21 22 |
# File 'lib/view_models/view.rb', line 20 def render_with render . end |