I want to change the keys Devise is using in flash alerts. (Devise uses
:notice and :alert flash keys, but I want to change them to :success and
:error so that I can display nice green/red boxes with Bootstrap.)
To that end, I want to monkey patch the set_flash_message
method in
DeviseControllerhttps://github.com/plataformatec/devise/blob/270e2ece19f20fdbb349b8130c31acc5b222fabb/app/controllers/devise_controller.rb
.
I created a file called config/initializers/overrides.rb that contains
the following:
class DeviseController
end
end
But now I get the following error on any Devise-related action:
Routing Error: undefined method `prepend_before_filter’ for
Devise::SessionsController:Class
What am I doing wrong?