Module: ViewModels::Extensions::View
- Defined in:
- lib/view_models/extensions/view.rb
Overview
Extensions for the View instance
Instance Method Summary collapse
-
#find_template(path) ⇒ Object
Finds the template in the view paths at the given path, with its format.
-
#render_with(options) ⇒ Object
Renders the template with the given options.
Instance Method Details
#find_template(path) ⇒ Object
Finds the template in the view paths at the given path, with its format.
23 24 25 |
# File 'lib/view_models/extensions/view.rb', line 23 def find_template path view_paths.find_template path, template_format rescue nil end |
#render_with(options) ⇒ Object
Renders the template with the given options
16 17 18 |
# File 'lib/view_models/extensions/view.rb', line 16 def render_with render . end |