Polymorphic association is a term used in discussions of Object-Relational Mapping with respect to the problem of representing in the relational database domain, a relationship from one class to multiple classes.
I have setup a role based access controll system with the following models: Role (as STI), UserRole (global roles) ProjectRole (…
ruby-on-rails conditional has-many polymorphic-associations single-table-inheritanceSuppose you were setting up a database to store crash test data of various vehicles. You want to store data …
database-design polymorphic-associations class-table-inheritanceA Person can have many Events and each Event can have one polymorphic Eventable record. How do I specify the …
ruby-on-rails activerecord has-many-through polymorphic-associationsI'm wondering if this its even posible. I want to join 2 tables based on the data of table 1. Example table 1 …
mysql join polymorphic-associationsI'm relatively new to Rails. I would like to add an association to a model that uses the polymorphic association, …
ruby-on-rails ruby-on-rails-3 polymorphic-associationsWhen working with a polymorphic association, is it possible to run an include on submodels that are only present in …
ruby-on-rails include polymorphic-associations eager-loading rails-activerecordI have a couple classes that can each have comments: class Movie < ActiveRecord::Base has_many :comments, :as => :…
ruby-on-rails polymorphic-associationsUsing Ruby on Rails, how can I achieve a polymorphic has_many relationship where the owner is always of a …
ruby-on-rails associations polymorphic-associationsI'm trying to setup a polymorphic one-to-one relationship (the polymorphic equivalent of has_one and belongs_to).I've got an …
laravel laravel-4 eloquent polymorphic-associationsI created a model for comments at the start of a project, but have now come to the realisation I …
ruby-on-rails models polymorphic-associations rails-migrations destroy