Sha256: 363ec68ca5e589582c452ecb8cf36384b67db72ba8f9b0d2a47d9531bf0b7de3

Contents?: true

Size: 416 Bytes

Versions: 6

Compression:

Stored size: 416 Bytes

Contents

unless defined?(Effective::AccessDenied)
  module Effective
    class AccessDenied < StandardError
      attr_reader :action, :subject

      def initialize(message = nil, action = nil, subject = nil)
        @message = message
        @action = action
        @subject = subject
      end

      def to_s
        @message || I18n.t(:'unauthorized.default', :default => 'Access Denied')
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
effective_email_templates-0.3.5 app/errors/effective/access_denied.rb
effective_email_templates-0.3.4 app/errors/effective/access_denied.rb
effective_email_templates-0.3.3 app/errors/effective/access_denied.rb
effective_email_templates-0.3.1 app/errors/effective/access_denied.rb
effective_email_templates-0.3.0 app/errors/effective/access_denied.rb
effective_email_templates-0.2.8 app/errors/effective/access_denied.rb