Sha256: aa94f54e3f6d0158aa7a2cb8babeb501d6fa5ed93ea46956796025fc909a3aca

Contents?: true

Size: 345 Bytes

Versions: 7

Compression:

Stored size: 345 Bytes

Contents

module AbAdmin
  module Views
    module Inputs
      class AssociationInput < ::SimpleForm::Inputs::CollectionSelectInput
        def input
          options[:collection] ||= object.class.reflect_on_association(attribute_name).klass.all
          @attribute_name = "#{attribute_name}_id"
          super
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ab_admin-0.2.3 lib/ab_admin/views/inputs/association_input.rb
ab_admin-0.2.2 lib/ab_admin/views/inputs/association_input.rb
ab_admin-0.2.1 lib/ab_admin/views/inputs/association_input.rb
ab_admin-0.2.0 lib/ab_admin/views/inputs/association_input.rb
ab_admin-0.1.2 lib/ab_admin/views/inputs/association_input.rb
ab_admin-0.1.1 lib/ab_admin/views/inputs/association_input.rb
ab_admin-0.1.0 lib/ab_admin/views/inputs/association_input.rb