Sha256: 2dbe0c745a6ccc399d08e7feba1fdc2b03c03a227c2646f0788569b0916d239b
Contents?: true
Size: 725 Bytes
Versions: 13
Compression:
Stored size: 725 Bytes
Contents
require 'administrate/field/belongs_to' require 'rails' module Administrate module Field class BelongsToSearch < Administrate::Field::BelongsTo class Engine < ::Rails::Engine initializer 'administrate-field-belongs_to_search.add_assets' do |app| app.config.assets.precompile << 'belongs_to_search.js' if app.config.respond_to? :assets Administrate::Engine.add_javascript 'belongs_to_search.js' if defined?(Administrate::Engine) end end def associated_resource_options if data.nil? [] else [[display_candidate_resource(data), data.id]] end end def associated_class super end end end end
Version data entries
13 entries across 13 versions & 2 rubygems