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

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -