Sha256: 447933974964ed1bdfe6e9931b33bf99ddf69ff22f1690c4387e0468110b61f1
Contents?: true
Size: 643 Bytes
Versions: 1
Compression:
Stored size: 643 Bytes
Contents
class ErrMerchant::ErrorsController < ApplicationController skip_authorization_check if defined?(::CanCan) skip_after_filter :verify_authorized if defined?(::Pundit) ERRORS = { :internal_server_error => 500, :not_found => 404, :conflict => 409, :unprocessable_entity => 422, :method_not_allowed => 405, :not_implemented => 501 }.freeze ERRORS.each do |e, status_code| define_method e do respond_to do |format| format.html { render 'template', :locals => {:status_code => status_code}, :layout => ErrMerchant.layout, :status => e } format.any { head e } end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
err_merchant-0.3.1 | app/controllers/err_merchant/errors_controller.rb |