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)
-
- (Object) find_template(path, second = nil)
Rails 3 calls it with 2 arguments.
-
- (View) initialize(controller, master_helper_module)
constructor
Include the helpers from the view model.
- - (Object) render_with(options)
Constructor Details
- (View) initialize(controller, master_helper_module)
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
- (Object) find_template(path, second = nil)
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 |
- (Object) render_with(options)
20 21 22 |
# File 'lib/view_models/view.rb', line 20 def render_with render . end |