what is Polymorphic Association in Ruby on Rails?



what is Polymorphic Association in Ruby on Rails?..

Answer / 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

More Ruby on Rails Interview Questions

what is rake in Rails?

1 Answers  


ruby on rails and java ,which of one of the best in future &present?

1 Answers  


What is the symbol garbage collector?

1 Answers  


Explain view in rails?

1 Answers  


How will be the future for ruby on rails?

1 Answers  


Explain valid and invalid in rails?

1 Answers  


Write the command to update rvm in rails.

1 Answers  


Tell me what is ruby on rails?

1 Answers  


What are the different filters used in ruby on rails?

1 Answers  


what is ORM (Object-Relationship-Model) in Rails?

1 Answers  


What are class libraries?

1 Answers  


How to serialize data with yaml?

1 Answers  


Categories