class Aldous::Respondable::Renderable
Public Instance Methods
action(controller)
click to toggle source
# File lib/aldous/respondable/renderable.rb, line 7 def action(controller) RenderAction.new(template, status, controller, view_data) end
default_status()
click to toggle source
# File lib/aldous/respondable/renderable.rb, line 11 def default_status :ok end
default_template_locals()
click to toggle source
# File lib/aldous/respondable/renderable.rb, line 15 def default_template_locals {} end
template(extra_locals = {})
click to toggle source
# File lib/aldous/respondable/renderable.rb, line 23 def template(extra_locals = {}) template_locals = template_data[:locals] || {} locals = default_template_locals.merge(template_locals) locals = locals.merge(extra_locals || {}) template_hash = template_data.merge(locals: locals) template_hash end
template_data()
click to toggle source
# File lib/aldous/respondable/renderable.rb, line 19 def template_data {} end