class ActionController::Base

Public Instance Methods

render_with_active_scaffold(*args, &block) click to toggle source
# File lib/active_scaffold/extensions/action_controller_rendering.rb, line 4
def render_with_active_scaffold(*args, &block)
  if self.class.uses_active_scaffold? and params[:adapter] and @rendering_adapter.nil?
    @rendering_adapter = true # recursion control
    # if we need an adapter, then we render the actual stuff to a string and insert it into the adapter template
    render :partial => params[:adapter][1..-1],
    :locals => {:payload => render_to_string(args.first.merge(:layout => false), &block)},
           :use_full_path => true, :layout => false
    @rendering_adapter = nil # recursion control
  else
    render_without_active_scaffold(*args, &block)
  end
end