class ApplicationController < ActionController::Base
  def no_resp_redir(dest)
    respond_to do |format|
      format.html { redirect_to dest }
      format.json { head :no_content }
    end
  end

  before_action :set_raven_context

  private

  def set_raven_context
    Raven.extra_context(params: params.to_hash, url: request.url)
  end
end

class ApplicationController < ActionController::Base
  def no_resp_redir(dest)
    respond_to do |format|
      format.html { redirect_to dest }
      format.json { head :no_content }
    end
  end

  before_action :set_raven_context

  private

  def set_raven_context
    Raven.extra_context(params: params.to_unsafe_h, url: request.url)
  end
end

Use to_unsafe_h instead of to_hash whichi is deprecated.
Raven: Use to_unsafe_h instead of to_hash whichi is deprecated.

Former-commit-id: cf4f069b658e8d4c705cd0a42a8d64a8e3c0c994