Sha256: 77ed3ce485ba892ec287eb760c2480e657f5d030697cfc32a5cdc79871788624

Contents?: true

Size: 759 Bytes

Versions: 30

Compression:

Stored size: 759 Bytes

Contents

require 'haml-rails'
require 'kaminari'
require 'simple_form'
require 'effective_datatables/engine'
require 'effective_datatables/version'

module EffectiveDatatables
  mattr_accessor :authorization_method
  mattr_accessor :date_format
  mattr_accessor :datetime_format
  mattr_accessor :integer_format
  mattr_accessor :boolean_format

  mattr_accessor :default_entries
  mattr_accessor :actions_column # A Hash

  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

30 entries across 30 versions & 1 rubygems

Version Path
effective_datatables-2.5.2 lib/effective_datatables.rb
effective_datatables-2.5.1 lib/effective_datatables.rb
effective_datatables-2.5.0 lib/effective_datatables.rb
effective_datatables-2.4.6 lib/effective_datatables.rb
effective_datatables-2.4.5 lib/effective_datatables.rb
effective_datatables-2.4.4 lib/effective_datatables.rb
effective_datatables-2.4.3 lib/effective_datatables.rb
effective_datatables-2.4.2 lib/effective_datatables.rb
effective_datatables-2.4.1 lib/effective_datatables.rb
effective_datatables-2.4.0 lib/effective_datatables.rb
effective_datatables-2.3.8 lib/effective_datatables.rb
effective_datatables-2.3.7 lib/effective_datatables.rb
effective_datatables-2.3.6 lib/effective_datatables.rb
effective_datatables-2.3.5 lib/effective_datatables.rb
effective_datatables-2.3.4 lib/effective_datatables.rb
effective_datatables-2.3.3 lib/effective_datatables.rb
effective_datatables-2.3.2 lib/effective_datatables.rb
effective_datatables-2.3.1 lib/effective_datatables.rb
effective_datatables-2.3.0 lib/effective_datatables.rb
effective_datatables-2.2.11 lib/effective_datatables.rb