Skip to content

Instantly share code, notes, and snippets.

@jmbejar
Created May 25, 2015 17:20
Show Gist options
  • Save jmbejar/2f8f397653316bc35507 to your computer and use it in GitHub Desktop.
Save jmbejar/2f8f397653316bc35507 to your computer and use it in GitHub Desktop.
class SubscriptorsController < ActionController::Metal
ActionController::Base.without_modules(:Flash, :Cookies).each do |left|
p left
include left
end
include Rails.application.routes.url_helpers
# Define some internal variables that should not be propagated to the view.
PROTECTED_IVARS = AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES + [
:@_status, :@_headers, :@_params, :@_env, :@_response, :@_request,
:@_view_runtime, :@_stream, :@_url_options, :@_action_has_layout ]
def _protected_ivars # :nodoc:
PROTECTED_IVARS
end
def self.protected_instance_variables
PROTECTED_IVARS
end
ActiveSupport.run_load_hooks(:action_controller, self)
# custom code here ....
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment