search for: devisecontrol

Displaying 1 result from an estimated 1 matches for "devisecontrol".

Did you mean: devicecontrol
2013 Jun 16
0
Monkey patching a gem's controller method
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 DeviseController<https://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 > def set_flash_message(key, kind, option...