module AbstractController::Rendering
def view_assigns
You can overwrite this configuration per controller.
This method should return a hash with assigns.
def view_assigns protected_vars = _protected_ivars variables = instance_variables variables.reject! { |s| protected_vars.include? s } variables.each_with_object({}) { |name, hash| hash[name.slice(1, name.length)] = instance_variable_get(name) } end