Ruby Developer Question:

Download Job Interview Questions and Answers PDF

Tell me what is Polymorphic Association in Ruby on Rails?

Ruby Developer Interview Question
Ruby Developer Interview Question

Answer:

Polymorphic Association allows an ActiveRecord object to be connected with Multiple ActiveRecord objects. A perfect example of Polymorphic Association is a social site where users can comment on anywhere whether it is a videos, photos, link, status updates etc. It would be not feasible if you have to create an individual comment like photos_comments, videos_comment and so on.

Download Ruby Developer Interview Questions And Answers PDF

Previous QuestionNext Question
Do you know what are the types of caching used in rails, what are they?Explain me what is the role of Rails Controller?