Module: Formtastic::Inputs::Base::Associations
- Included in:
- Formtastic::Inputs::Base
- Defined in:
- lib/formtastic/inputs/base/associations.rb
Instance Method Summary collapse
-
#association ⇒ Object
:belongs_to, etc.
- #association_primary_key ⇒ Object
- #belongs_to? ⇒ Boolean
- #has_many? ⇒ Boolean
- #reflection ⇒ Object
Instance Method Details
#association ⇒ Object
:belongs_to, etc
8 9 10 |
# File 'lib/formtastic/inputs/base/associations.rb', line 8 def association @association ||= association_macro_for_method(method) end |
#association_primary_key ⇒ Object
24 25 26 |
# File 'lib/formtastic/inputs/base/associations.rb', line 24 def association_primary_key association_primary_key_for_method(method) end |
#belongs_to? ⇒ Boolean
16 17 18 |
# File 'lib/formtastic/inputs/base/associations.rb', line 16 def belongs_to? association == :belongs_to end |
#has_many? ⇒ Boolean
20 21 22 |
# File 'lib/formtastic/inputs/base/associations.rb', line 20 def has_many? association == :has_many end |
#reflection ⇒ Object
12 13 14 |
# File 'lib/formtastic/inputs/base/associations.rb', line 12 def reflection @reflection ||= reflection_for(method) end |