# File lib/erector/rails2/template_handlers/rb_handler.rb, line 2 def instance_variables_for_widget_assignment instance_variables_for_widget_assignment_for(controller) end
# File lib/erector/rails2/template_handlers/rb_handler.rb, line 6 def instance_variables_for_widget_assignment_for(target) assigns = { } variables = target.instance_variable_names variables -= target.protected_instance_variables if target.respond_to?(:protected_instance_variables) variables -= %w{@real_format @request @template @_request} variables.each do |name| assign = name.sub('@', '').to_sym assigns[assign] = target.instance_variable_get(name) end assigns end