Sha256: 642373b6708e89840ad54bd2051586c149504b4d424f29674a1b0ceef2f2e767

Contents?: true

Size: 612 Bytes

Versions: 37

Compression:

Stored size: 612 Bytes

Contents

module Formtastic
  module Inputs
    module Base
      module Associations
        include Formtastic::Helpers::Reflection

        # :belongs_to, etc
        def association
          @association ||= association_macro_for_method(method)
        end

        def reflection
          @reflection ||= reflection_for(method)
        end

        def belongs_to?
          association == :belongs_to
        end

        def has_many?
          association == :has_many
        end

        def association_primary_key
          association_primary_key_for_method(method)
        end

      end
    end
  end
end

Version data entries

37 entries across 37 versions & 3 rubygems

Version Path
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/formtastic-4.0.0/lib/formtastic/inputs/base/associations.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/formtastic-4.0.0/lib/formtastic/inputs/base/associations.rb
formtastic-4.0.0 lib/formtastic/inputs/base/associations.rb
formtastic-4.0.0.rc1 lib/formtastic/inputs/base/associations.rb
formtastic-3.1.5 lib/formtastic/inputs/base/associations.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/formtastic-3.1.4/lib/formtastic/inputs/base/associations.rb
formtastic-3.1.4 lib/formtastic/inputs/base/associations.rb
formtastic-3.1.3 lib/formtastic/inputs/base/associations.rb
formtastic-3.1.2 lib/formtastic/inputs/base/associations.rb
formtastic-3.1.1 lib/formtastic/inputs/base/associations.rb
formtastic-3.1.0 lib/formtastic/inputs/base/associations.rb
formtastic-3.1.0.rc2 lib/formtastic/inputs/base/associations.rb
formtastic-3.1.0.rc1 lib/formtastic/inputs/base/associations.rb
formtastic-3.0.0 lib/formtastic/inputs/base/associations.rb
formtastic-3.0.0.rc2 lib/formtastic/inputs/base/associations.rb
formtastic-2.3.1 lib/formtastic/inputs/base/associations.rb
formtastic-2.3.0 lib/formtastic/inputs/base/associations.rb
formtastic-3.0.0.rc lib/formtastic/inputs/base/associations.rb
formtastic-2.3.0.rc4 lib/formtastic/inputs/base/associations.rb
formtastic-2.3.0.rc3 lib/formtastic/inputs/base/associations.rb