mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Rename get_message
to find_message
and fix set_flash_message
This commit is contained in:
parent
8e9ad4626e
commit
95f56258d7
1 changed files with 4 additions and 3 deletions
|
@ -163,12 +163,13 @@ MESSAGE
|
|||
#
|
||||
# Please refer to README or en.yml locale file to check what messages are
|
||||
# available.
|
||||
def set_flash_message(key, kind, options={})
|
||||
flash[key] = get_message(kind, options) if message.present?
|
||||
def set_flash_message(key, kind, options = {})
|
||||
message = find_message(kind, options)
|
||||
flash[key] = message if message.present?
|
||||
end
|
||||
|
||||
# Get message for given
|
||||
def get_message(kind, options = {})
|
||||
def find_message(kind, options = {})
|
||||
options[:scope] = "devise.#{controller_name}"
|
||||
options[:default] = Array(options[:default]).unshift(kind.to_sym)
|
||||
options[:resource_name] = resource_name
|
||||
|
|
Loading…
Reference in a new issue