Sha256: b45592336f5d9ba4fba50b08b68def1871bf887b7020c75c27beeb945941c31b

Contents?: true

Size: 1.01 KB

Versions: 7

Compression:

Stored size: 1.01 KB

Contents

EffectiveDatatables.setup do |config|
  # Authorization Method
  #
  # This method is called by all controller actions with the appropriate action and resource
  # If the method returns false, an Effective::AccessDenied Error will be raised (see README.md for complete info)
  #
  # Use via Proc (and with CanCan):
  # config.authorization_method = Proc.new { |controller, action, resource| authorize!(action, resource) }
  #
  # Use via custom method:
  # config.authorization_method = :my_authorization_method
  #
  # And then in your application_controller.rb:
  #
  # def my_authorization_method(action, resource)
  #   current_user.is?(:admin)
  # end
  #
  # Or disable the check completely:
  # config.authorization_method = false

  config.authorization_method = Proc.new { |controller, action, resource| true } # All users can see every screen

  # Date & DateTime Format
  # By default, format Date and DateTime values with the following
  config.date_format = "%Y-%m-%d"
  config.datetime_format = "%Y-%m-%d %H:%M"


end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
effective_datatables-1.2.4 lib/generators/templates/effective_datatables.rb
effective_datatables-1.2.3 lib/generators/templates/effective_datatables.rb
effective_datatables-1.2.2 lib/generators/templates/effective_datatables.rb
effective_datatables-1.2.1 lib/generators/templates/effective_datatables.rb
effective_datatables-1.2.0 lib/generators/templates/effective_datatables.rb
effective_datatables-1.1.6 lib/generators/templates/effective_datatables.rb
effective_datatables-1.1.5 lib/generators/templates/effective_datatables.rb