search for: relationable

Displaying 3 results from an estimated 3 matches for "relationable".

2006 Jun 23
2
polymorphic challenge
...s All these relations are like; User <-> Relation <-> User I was thinking I could have a class called Relation (with a table relations) and use through + polymorphic features. Something in this range; create_table :relations do |t| t.column :user_id, :integer t.column :relationable_type, :string t.column :relationable_id, :string t.column :created_at, :datetime end class Relation < ActiveRecord::Base belongs_to :relationable, :polymorphic => true end class User has_many :favorite_profiles, :as => :relationable, :class_name => "Relation&quot...
2007 May 14
1
Trying to install CentOS 4.4 as a domU
Hi all, Few days ago I installed a CentOS 5 domU on a xen-box with CentOS 5 dom0 also. All worked fine; I used virt-install assistant and I created a local http repo for increase the process speed. I've tried to do the same with CentOS 4.4 domU, but always I get an error relationated with unavailable HTTP resource. It's curious... so I downloaded the x86_64 complete DVDs for 5 and
2007 Sep 03
7
relationing has_many, belongs_to
Hello, i want to know if i am relationing fine, because i am having problems,i have 2 models, one for members and other to relate some members to this: class Member < ActiveRecord::Base has_many :matrix, :foreign_key=>:parent end class Matrix < ActiveRecord::Base set_table_name :matrix set_primary_key :userid belongs_to :member, :foreign_key=>:userid acts_as_tree