Sha256: 66a37c28492c7e7b005329c023acb27158c9bba1862c9d71442e4702c7119bd7

Contents?: true

Size: 500 Bytes

Versions: 1

Compression:

Stored size: 500 Bytes

Contents

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

    def options
      @options ||= {
          fields: [{}],
          thumbnail_fields: [:image, :cover],
          hint_fields: [],
          thumbnail_size: :thumb,
          thumbnail_gem: :paperclip,
      }.merge(config || {})
    end

    protected
    def config
      ::RailsAdmin::Config.model(@abstract_model.model).sort_embedded || {}
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails_admin_sort_embedded-0.1.1 lib/rails_admin_sort_embedded/configuration.rb