Sha256: d4772114048a0cafab7d247a998de149baa9fb2929968d9dbb0e55de5e6b5a86

Contents?: true

Size: 723 Bytes

Versions: 4

Compression:

Stored size: 723 Bytes

Contents

# see https://github.com/amatsuda/kaminari/blob/master/lib/kaminari/config.rb
module Adhoq
  class Configuration
    include ActiveSupport::Configurable

    config_accessor :storage do
      [:on_the_fly]
    end

    config_accessor :authorization
    config_accessor :authorization_failure_action

    config_accessor :current_user

    config_accessor :database_connection
    config_accessor :hidden_model_names

    config_accessor :async_execution
    config_accessor :job_queue_name

    def callablize(name)
      if (c = config[name]).respond_to?(:call)
        c
      else
        c.to_proc
      end
    end

    def async_execution?
      defined?(ActiveJob) && Adhoq.config.async_execution
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
adhoq-0.1.2 lib/adhoq/configuration.rb
adhoq-0.1.1 lib/adhoq/configuration.rb
adhoq-0.1.0 lib/adhoq/configuration.rb
adhoq-0.0.7 lib/adhoq/configuration.rb