module ActionComponent::ActionControllerRendering
Private Instance Methods
render_component(component_class, opts = {})
click to toggle source
# File lib/action_component/action_controller_rendering.rb, line 5 def render_component(component_class, opts = {}) @_component_class = component_class @_component_options = opts render_opts = { inline: "<% render_component(@_component_class, @_component_options) %>", layout: true } [:content_type, :layout, :location, :status, :formats].each do |option| render_opts[option] = opts[option] if opts.member?(option) end render render_opts end