Sha256: 84c64e9b79e09fae27b7c45971be968a90953f80d7c507cdc1489e7b7fb08024

Contents?: true

Size: 672 Bytes

Versions: 26

Compression:

Stored size: 672 Bytes

Contents

require 'simple_form'
require 'effective_resources'
require 'effective_datatables/engine'
require 'effective_datatables/version'

module EffectiveDatatables
  mattr_accessor :authorization_method

  mattr_accessor :default_length
  mattr_accessor :html_class

  mattr_accessor :actions_column # A Hash
  mattr_accessor :debug

  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

26 entries across 26 versions & 1 rubygems

Version Path
effective_datatables-3.3.6 lib/effective_datatables.rb
effective_datatables-3.3.5 lib/effective_datatables.rb
effective_datatables-3.3.4 lib/effective_datatables.rb
effective_datatables-3.3.3 lib/effective_datatables.rb
effective_datatables-3.3.2 lib/effective_datatables.rb
effective_datatables-3.3.1 lib/effective_datatables.rb
effective_datatables-3.3.0 lib/effective_datatables.rb
effective_datatables-3.2.7 lib/effective_datatables.rb
effective_datatables-3.2.6 lib/effective_datatables.rb
effective_datatables-3.2.5 lib/effective_datatables.rb
effective_datatables-3.2.4 lib/effective_datatables.rb
effective_datatables-3.2.3 lib/effective_datatables.rb
effective_datatables-3.2.2 lib/effective_datatables.rb
effective_datatables-3.2.1 lib/effective_datatables.rb
effective_datatables-3.2 lib/effective_datatables.rb
effective_datatables-3.1.3 lib/effective_datatables.rb
effective_datatables-3.1.2 lib/effective_datatables.rb
effective_datatables-3.1.1 lib/effective_datatables.rb
effective_datatables-3.1.0 lib/effective_datatables.rb
effective_datatables-3.0.16 lib/effective_datatables.rb