adspace


what is Polymorphic Association in Ruby on Rails?

Answer Posted / Kamal Kihsor

Polymorphic Association in Ruby on Rails allows one association to be shared by multiple classes. For example, a Post can have multiple Comments, and a User can also have multiple Comments, so the Comment model has a polymorphic association with both Post and User.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the current version of ruby on rails?

949