Skip to content

Instantly share code, notes, and snippets.

@mneedham
Created September 18, 2010 18:06
Show Gist options
  • Select an option

  • Save mneedham/585902 to your computer and use it in GitHub Desktop.

Select an option

Save mneedham/585902 to your computer and use it in GitHub Desktop.
if !defined?(Rails::Railtie)
Rails.configuration.after_initialize do
class ::ActionController::Base
include RailsWarden::Mixins::HelperMethods
include RailsWarden::Mixins::ControllerOnlyMethods
end
module ::ApplicationHelper
include RailsWarden::Mixins::HelperMethods
end
end
else
class RailsWarden::Railtie < Rails::Railtie
initializer :warden do
::ActionController::Base.class_eval do
include RailsWarden::Mixins::HelperMethods
include RailsWarden::Mixins::ControllerOnlyMethods
end
module ::ApplicationHelper
include RailsWarden::Mixins::HelperMethods
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment