Sha256: e8bdccca352e55c72596d0195da8981c7164f860e221f4c0803e674964dbdcd5

Contents?: true

Size: 1.05 KB

Versions: 8

Compression:

Stored size: 1.05 KB

Contents

# frozen_string_literal: true

module DeviseHelper
  # Retain this method for backwards compatibility, deprecated in favor 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 will be
      removed in the next major version.

      Devise now uses a partial under "devise/shared/error_messages" to display
      error messages by default, and make them easier to customize. Update your
      views changing calls from:

          <%= devise_error_messages! %>

      to:

          <%= render "devise/shared/error_messages", resource: resource %>

      To start customizing how errors are displayed, you can copy the partial
      from devise to your `app/views` folder. Alternatively, you can run
      `rails g devise:views` which will copy all of them again to your app.
    DEPRECATION

    return "" if resource.errors.empty?

    render "devise/shared/error_messages", resource: resource
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
devise-4.9.2 app/helpers/devise_helper.rb
devise-4.9.1 app/helpers/devise_helper.rb
devise-4.9.0 app/helpers/devise_helper.rb
devise-4.8.1 app/helpers/devise_helper.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/devise-4.8.0/app/helpers/devise_helper.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/devise-4.8.0/app/helpers/devise_helper.rb
devise-4.8.0 app/helpers/devise_helper.rb
devise-4.7.3 app/helpers/devise_helper.rb