Class: ActiveSchema::Associations::ByForwardForeignKey
- Inherits:
-
ByForeignKey
- Object
- ByForeignKey
- ActiveSchema::Associations::ByForwardForeignKey
- Defined in:
- lib/active_schema/associations/by_foreign_key.rb
Instance Method Summary collapse
Methods inherited from ByForeignKey
Methods included from Naming
Constructor Details
This class inherits a constructor from ActiveSchema::Associations::ByForeignKey
Instance Method Details
#generate ⇒ Object
27 28 29 30 31 |
# File 'lib/active_schema/associations/by_foreign_key.rb', line 27 def generate association @from_model, :belongs_to, name_for(@to_model), { :class_name => @to_model.name, :foreign_key => @key_column } end |