Module: Briefly::Rails::View
- Defined in:
- lib/briefly/rails.rb
Overview
Helpers, routes and rendering outside a controller.
Class Method Summary collapse
Class Method Details
.install(builder) ⇒ Briefly::Builder
82 83 84 85 86 87 88 |
# File 'lib/briefly/rails.rb', line 82 def install(builder) builder.shortcut(:helpers, :h) { ::ApplicationController.helpers } builder.shortcut(:routes, :r) { ::Rails.application.routes.url_helpers } builder.shortcut(:renderer) { ::ApplicationController.renderer } builder.shortcut(:render) { |*args, **kwargs, &blk| renderer.render(*args, **kwargs, &blk) } builder end |