Sha256: 018eb996eb042a32ec5428e6c591a6d862afda7cb9e3fcb58c4e9088dbbfbf82

Contents?: true

Size: 360 Bytes

Versions: 5

Compression:

Stored size: 360 Bytes

Contents

module RailsAdminNestedSet
  class Configuration
    def initialize(abstract_model)
      @abstract_model = abstract_model
    end

    def options
      @options ||= {
          max_depth: 1,
      }.merge(config)

      @options || {}
    end

    protected
    def config
      ::RailsAdmin::Config.model(@abstract_model.model).nested_set
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rails_admin_nested_set-0.1.1 lib/rails_admin_nested_set/configuration.rb
rails_admin_nested_set-0.1.0 lib/rails_admin_nested_set/configuration.rb
rails_admin_nested_set-0.0.3 lib/rails_admin_nested_set/configuration.rb
rails_admin_nested_set-0.0.2 lib/rails_admin_nested_set/configuration.rb
rails_admin_nested_set-0.0.1 lib/rails_admin_nested_set/configuration.rb