Sha256: aad191a477aca0def89f1aed990cb54f73e6de691800f886339e2c02dc27c95c
Contents?: true
Size: 639 Bytes
Versions: 21
Compression:
Stored size: 639 Bytes
Contents
module ActiveAdminAddons module RansackFormBuilderExtension extend ActiveSupport::Concern included do alias_method_chain :input, :ransack end def input_with_ransack(method, options={}) if object.is_a?(::Ransack::Search) klass = object.klass if klass.respond_to?(:enumerized_attributes) && (attr = klass.enumerized_attributes[method]) options[:collection] ||= attr.options options[:as] = :select end end input_without_ransack(method, options) end end end ::Formtastic::FormBuilder.send :include, ActiveAdminAddons::RansackFormBuilderExtension
Version data entries
21 entries across 21 versions & 1 rubygems
Version | Path |
---|---|
activeadmin_addons-0.2.0 | lib/activeadmin_addons/support/enumerize_formtastic_support.rb |