Class: Cocooned::Association::Renderer
- Inherits:
-
Object
- Object
- Cocooned::Association::Renderer
- Defined in:
- lib/cocooned/association/renderer.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(template, form, association, object, options = {}) ⇒ Renderer
constructor
A new instance of Renderer.
- #render ⇒ Object
Constructor Details
#initialize(template, form, association, object, options = {}) ⇒ Renderer
Returns a new instance of Renderer.
6 7 8 9 10 11 12 |
# File 'lib/cocooned/association/renderer.rb', line 6 def initialize(template, form, association, object, = {}) @template = template @form = form @association = association @object = object @options = .dup.symbolize_keys end |
Instance Method Details
#render ⇒ Object
14 15 16 17 18 |
# File 'lib/cocooned/association/renderer.rb', line 14 def render form.public_send(form_method, association, object, ) do |form| template.render(partial, **(form)) end end |