Sha256: 59323eac6cca78f3176cc405798f4cc09e80a46e48e0098f6e097f0dc85dae92

Contents?: true

Size: 525 Bytes

Versions: 11

Compression:

Stored size: 525 Bytes

Contents

module AdminIt
  module Config
    def self.root
      @root ||= Rails.root.join('app', 'admin_it')
    end

    def self.root=(value)
      value = File.expand_path(value, Rails.root)
      fail ArgumentError unless File.directory?(value)
      @root = value
    end

    def self.controller
      @controller ||= ActionController::Base
    end

    def self.controller=(value)
      unless value <= ActionController::Base
        fail ArgumentError, 'Wrong controller'
      end
      @controller = value
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
admin_it-1.0.11 lib/admin_it/config.rb
admin_it-1.0.10 lib/admin_it/config.rb
admin_it-1.0.9 lib/admin_it/config.rb
admin_it-1.0.8 lib/admin_it/config.rb
admin_it-1.0.7 lib/admin_it/config.rb
admin_it-1.0.6 lib/admin_it/config.rb
admin_it-1.0.5 lib/admin_it/config.rb
admin_it-1.0.4 lib/admin_it/config.rb
admin_it-1.0.3 lib/admin_it/config.rb
admin_it-1.0.2 lib/admin_it/config.rb
admin_it-1.0.1 lib/admin_it/config.rb