mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Add a deprecation warn for DeviseHelper.devise_error_messages!
To customize the error style one should modifying the `devise/shared/error_messages` partial.
This commit is contained in:
parent
66a96ab9d6
commit
14785afe8d
1 changed files with 7 additions and 0 deletions
|
@ -4,6 +4,13 @@ module DeviseHelper
|
|||
# Retain this method for backwards compatibility, deprecated in favour of modifying the
|
||||
# devise/shared/error_messages partial
|
||||
def devise_error_messages!
|
||||
ActiveSupport::Deprecation.warn <<-DEPRECATION.strip_heredoc
|
||||
[Devise] `DeviseHelper.devise_error_messages!`
|
||||
is deprecated and it will be removed in the next major version.
|
||||
To customize the errors styles please run `rails g devise:views` and modify the
|
||||
`devise/shared/error_messages` partial.
|
||||
DEPRECATION
|
||||
|
||||
return "" if resource.errors.empty?
|
||||
|
||||
render "devise/shared/error_messages", resource: resource
|
||||
|
|
Loading…
Reference in a new issue