class DeviseController
def set_flash_message(key, kind, options = {})
Please refer to README or en.yml locale file to check what messages are
#resource_scope_messages
user:
#default_scope_messages - only if resource_scope is not found
passwords:
devise:
en:
Example (i18n locale file):
next action).
the flash message will be available to the current action instead of the
value to populate the flash.now hash in lieu of the default flash hash (so
found we look to the default scope. Set the "now" options key to a true
to set up your messages using specific resource scope, and if no message is
Sets the flash message with :key, using I18n. By default you are able
def set_flash_message(key, kind, options = {}) message = find_message(kind, options) if options[:now] flash.now[key] = message if message.present? else flash[key] = message if message.present? end end