search for: favorite_users

Displaying 1 result from an estimated 1 matches for "favorite_users".

Did you mean: favorites_users
2006 Jul 10
2
Polymorphic associations in reverse?
...:favorite belongs_to :favorable, :polymorphic => :true # Has many favorite ''things'' has_many :favorites, :dependent => :destroy has_many :favorite_images, :as => :favorable, :through => :favorites, :classname => "Image" has_many :favorite_users, :as => :favorable, :through => :favorites, :classname => "User" end class Favorite < ActiveRecord::Base belongs_to :favorable, :polymorphic => true end create_table "favorites" do |t| t.column :user_id, :integer t.column :favorable_id, :int...