Module: ViewModels::Extensions::View
- Defined in:
- lib/view_models/extensions/view.rb
Overview
Extensions for the View instance
Instance Method Summary (collapse)
-
- (Object) find_template(path)
Finds the template in the view paths at the given path, with its format.
-
- (Object) render_with(options)
Renders the template with the given options.
Instance Method Details
- (Object) find_template(path)
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 |
- (Object) render_with(options)
Renders the template with the given options
16 17 18 |
# File 'lib/view_models/extensions/view.rb', line 16 def render_with render . end |