I have the following hierarchy @MappedSuperclass @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
My question was if Post has_many Comments, and I just want to update a comment, should I do that in the Post, or Comments controllers. I just watched the Railscasts on Polymorphic Associations and saw
I have a polymorhpic model as follows: class Upload < ActiveRecord::Base belongs_to :uploadable, :polymorphic => true
I have a model named User . I am using Devise for authentication. The \'User\' has many \'Profiles\' and one default profile . So I have added a column called \'default\' to the User model. I want to
I\'m having troubles getting a polymorphic many-to-many model working in ruby/rails. The model has three tables that need to be joined, Infection, Drug, and Symptom:
I\'m trying to make an app where a user can save goals, milestones for those goals, tasks for the milestones, and tasks for the goal itself. I\'m using polymorphic associations, but making a form to i
I\'m making an app with the following attributes, and I\'m working on a creating a single form to be able to save a goal, a goal\'s tasks, a goal\'s milestones, and a milestone\'s tasks.
Here are my models: class Lesson < ActiveRecord::Base belongs_to :topic, :polymorphic => true validates_presence_of :topic_type, :topic_id
I\'m creating a DB schema for PostgreSQL 9.0 DB that will represent many real-world entities, with a table per entity. Most of these entities can have 0 or more free-text notes associated with them. A
I have a polymorphic association - \"address\" (belongs to \"addressable\"). Amongst others, it s开发者_JS百科erves the \"shop\" model.