review.created_reviews.name On Mon, Sep 22, 2008 at 4:58 PM, Becca Girl <[EMAIL PROTECTED]> wrote: > > Ok, here's what I have in my models. > > class Review < ActiveRecord::Base > belongs_to :reviewable, :polymorphic => true > belongs_to :created_reviews, :class_name => 'User', :foreign_key => > 'create_review_user_id' > belongs_to :modified_reviews, :class_name => 'User', :foreign_key => > 'modify_review_user_id' > end > > > > class User < ActiveRecord::Base > has_many :reviews, :as => :reviewable > has_many :created_reviews, :foreign_key => 'create_review_user_id' > has_many :modified_reviews, :foreign_key => 'create_review_user_id' > > > Sorry I'm so dense, but after all of that, how do I access User.name? > > > -- > Posted via http://www.ruby-forum.com/. > > > >
-- Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) João Pessoa, PB, +55 83 8867-7208 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

