mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-10 23:38:10 -05:00
Update find_message to accept scope
This should still keep the devise lookup in the case that a customed scope is not passed as option, but if instead the custom scope is passed, then the find_message method will use it. This is kind of useful, if i don't want overwrite the devise locale, and use different locale files, but keeping still the fallback of my devise locale.
This commit is contained in:
@@ -167,7 +167,7 @@ MESSAGE
|
||||
|
||||
# Get message for given
|
||||
def find_message(kind, options = {})
|
||||
options[:scope] = "devise.#{controller_name}"
|
||||
options[:scope] = "devise.#{controller_name}" unless options[:scope]
|
||||
options[:default] = Array(options[:default]).unshift(kind.to_sym)
|
||||
options[:resource_name] = resource_name
|
||||
options = devise_i18n_options(options)
|
||||
|
||||
Reference in New Issue
Block a user