0
votes

I know that in the config/locales I can change the text used with the Rails Devise gem for various flash messages (sign_in/sign_out/etc).

My question is, can I make that conditional based on perhaps a variable or something.

Currently during sign_out process, Devise will automatically put a flash message for a successful sign out. There are times in my app when I force the user to logout (e.g. their membership expired). I currently force the logout, but then it's popping up with the "Signed out successfully." I want keep that message when in fact they do sign out themselves, but put a notice up about their membership if the app forces them out.

1

1 Answers

0
votes

I think there is a better idea is you should need to override controller of devise and then set any flash message as you wish.

this will help you

Override devise registrations controller