Using :owner in Ruby on Rails -
sorry simple , maybe stupid quation.
in model have next line code:
belongs_to :owner, polymorphic: true
i cant found in project model owner. owner in rails , how use it? can found more information this?
this association polymorphic. means in database have 2 columns: owner_id
, owner_type
, , in owner_type
column have class name of associated model.
you can read more here:
http://guides.rubyonrails.org/association_basics.html#polymorphic-associations
Comments
Post a Comment