Sha256: 55214b004d19e7d73f4ef47e93f6c9c7df6742573839e2ff956e10e7dcbc8f06

Contents?: true

Size: 517 Bytes

Versions: 11

Compression:

Stored size: 517 Bytes

Contents

require 'effective_resources'
require 'generators/effective/helpers'
require 'effective_developer/engine'
require 'effective_developer/version'

module EffectiveDeveloper

  def self.setup
    yield self
  end

  def self.authorized?(controller, action, resource)
    if authorization_method.respond_to?(:call) || authorization_method.kind_of?(Symbol)
      raise Effective::AccessDenied.new() unless (controller || self).instance_exec(controller, action, resource, &authorization_method)
    end
    true
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
effective_developer-0.2.12 lib/effective_developer.rb
effective_developer-0.2.11 lib/effective_developer.rb
effective_developer-0.2.10 lib/effective_developer.rb
effective_developer-0.2.9 lib/effective_developer.rb
effective_developer-0.2.8 lib/effective_developer.rb
effective_developer-0.2.7 lib/effective_developer.rb
effective_developer-0.2.6 lib/effective_developer.rb
effective_developer-0.2.5 lib/effective_developer.rb
effective_developer-0.2.4 lib/effective_developer.rb
effective_developer-0.2.3 lib/effective_developer.rb
effective_developer-0.2.2 lib/effective_developer.rb