Class: Rails::AddOns::WidgetsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/rails/add_ons/widgets_controller.rb

Instance Method Summary collapse

Instance Method Details

#remote_renderObject


4
5
6
7
# File 'app/controllers/rails/add_ons/widgets_controller.rb', line 4

def remote_render
  widget_name, action = *params[:name].split("#")
  render plain: widget_name.camelize.constantize.new(view_context).render(action)
end