Module: Formtastic::Inputs::Base::Associations

Included in:
Formtastic::Inputs::Base
Defined in:
lib/formtastic/inputs/base/associations.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) association

:belongs_to, etc



8
9
10
# File 'lib/formtastic/inputs/base/associations.rb', line 8

def association
  @association ||= association_macro_for_method(method)
end

- (Object) association_primary_key



24
25
26
# File 'lib/formtastic/inputs/base/associations.rb', line 24

def association_primary_key
  association_primary_key_for_method(method)
end

- (Boolean) belongs_to?



16
17
18
# File 'lib/formtastic/inputs/base/associations.rb', line 16

def belongs_to?
  association == :belongs_to
end

- (Boolean) has_many?



20
21
22
# File 'lib/formtastic/inputs/base/associations.rb', line 20

def has_many?
  association == :has_many
end

- (Object) reflection



12
13
14
# File 'lib/formtastic/inputs/base/associations.rb', line 12

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