Devise, ActionController::UnknownFormat
<p>I am using devise for authentication, and my application send email with confirmation, but when I click 'confirm my account' I have this error:</p>

<blockquote>
  <p>ActionController::UnknownFormat</p>
</blockquote>

<p>Where is my problem?</p>

<p>my <strong>application_controller.rb</strong></p>

<pre><code>class ApplicationController &lt; ActionController::Base
  protect_from_forgery with: :exception
  before_action :configure_permitted_parameters, if: :devise_controller?

  def authenticate_admin_user!
    authenticate_user!
    redirect_to root_path unless current_user.admin?
  end

  protected

  def configure_permitted_parameters
    devise_parameter_sanitizer.for(:sign_up) &lt;&lt; :first_name &lt;&lt; :last_name
  end
end
</code></pre>

<p>my <strong>confirmation_instructions.html</strong></p>

<pre><code>&lt;p&gt;Welcome &lt;%= @email %&gt;!&lt;/p&gt;

&lt;p&gt;You can confirm your account email through the link below:&lt;/p&gt;

&lt;p&gt;&lt;%= link_to 'Confirm my account', user_confirmation_url(@resource, confirmation_token: @token) %&gt;&lt;/p&gt;
</code></pre>