I'm using Devise for my Rails 3 app.
How do I turn off Devise's alert messages for sign on/off successfully?
You can either:
Go to config\locales\devise.en.yml and change the lines you want to empty strings (deleting them won't work). So, like this:
sessions:
signed_in: ''
signed_out: ''
Or extend/override devise's sessions controller. To do this, copy the create
and destroy
actions code from here, and paste it in a controller (let's call it sessions) that inherits from devise's sessions controller, like this:
class SessionsController < Devise::SessionsController
Then remove the calls to set_flash_message. Finally, edit your routes file so this change takes effect:
devise_for :users, :controllers => { :sessions => 'sessions' }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With