title: ActionController::UnknownFormat in Devise::SessionsController#new in rails 4
body: <p>I am trying for long time and did google about the issue I am unable to get rid of it. Can any one explains why this is happening and how to resolve it.</p>
  
  <pre><code>  def new
      self.resource = resource_class.new(sign_in_params)
      clean_up_passwords(resource)
      respond_with(resource, serialize_options(resource))
    end
  </code></pre>
  
  <p>The error is in the line following line
  <strong>respond_with(resource, serialize_options(resource))</strong></p>
  
  <p>When I register devise will send a confirmation link. When I click the link getting the above error and here is my url</p>
  
  <pre><code>http://localhost/users/sign_in.47
  </code></pre>
  
  <p><strong>update 1</strong></p>
  
  <p>Here is my show action of confirmations_controller.rb</p>
  
  <pre><code>  def show
      self.resource = resource_class.confirm_by_token(params[:confirmation_token])
      yield resource if block_given?
  
      if resource.errors.empty?
        set_flash_message(:notice, :confirmed) if is_flashing_format?
        respond_with_navigational(resource){ redirect_to after_confirmation_path_for(resource_name, resource) }
      else
        respond_with_navigational(resource.errors, status: :unprocessable_entity){ render :new }
      end
    end
  
  def after_sign_up_or_sign_in_path_for resource
        User.where(id: resource.id).update_all(online: true)
        dashboard_path
      end
  </code></pre>
  
  <p>I need to update user as online once they logged in so i used resource.id that makes me trouble it seems</p>