Module: ActiveScaffold::ReverseAssociation::ThroughAssociation

Defined in:
lib/active_scaffold/extensions/reverse_associations.rb

Instance Method Summary collapse

Instance Method Details

#invertible_for?(record) ⇒ Boolean

NOTE - for now, we’re only supporting inverse setting back onto has_one associations. TODO remove when rails fixes this and old versions are not supported

Returns:

  • (Boolean)


109
110
111
112
# File 'lib/active_scaffold/extensions/reverse_associations.rb', line 109

def invertible_for?(record)
  inverse = super
  inverse && !inverse.collection?
end