Sha256: ba5d10069fe836f6100605ae20d36a585db8a6d6c02f2a82106cbaebd4acc836

Contents?: true

Size: 800 Bytes

Versions: 32

Compression:

Stored size: 800 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

  mattr_accessor :google_chart_packages

  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

32 entries across 32 versions & 1 rubygems

Version Path
effective_datatables-2.6.21 lib/effective_datatables.rb
effective_datatables-2.12.2 lib/effective_datatables.rb
effective_datatables-2.12.1 lib/effective_datatables.rb
effective_datatables-2.12.0 lib/effective_datatables.rb
effective_datatables-2.11.2 lib/effective_datatables.rb
effective_datatables-2.11.1 lib/effective_datatables.rb
effective_datatables-2.11.0 lib/effective_datatables.rb
effective_datatables-2.10.0 lib/effective_datatables.rb
effective_datatables-2.9.0 lib/effective_datatables.rb
effective_datatables-2.8.0 lib/effective_datatables.rb
effective_datatables-2.7.0 lib/effective_datatables.rb
effective_datatables-2.6.20 lib/effective_datatables.rb
effective_datatables-2.6.19 lib/effective_datatables.rb
effective_datatables-2.6.18 lib/effective_datatables.rb
effective_datatables-2.6.17 lib/effective_datatables.rb
effective_datatables-2.6.16 lib/effective_datatables.rb
effective_datatables-2.6.15 lib/effective_datatables.rb
effective_datatables-2.6.14 lib/effective_datatables.rb
effective_datatables-2.6.13 lib/effective_datatables.rb
effective_datatables-2.6.12 lib/effective_datatables.rb