class Comment < ActiveRecord::Base belongs_to :commentable, :polymorphic => true
# NOTE: install the acts_as_votable plugin if you # want user to vote on the quality of comments. #acts_as_voteable # NOTE: Comments belong to a user belongs_to :user .... end class Story < ActiveRecord::Base acts_as_commentable acts_as_taggable_on :tags has_many :cores belongs_to :user validates_presence_of :title validates_presence_of :description validates_presence_of :rules validates_length_of :title, :within => 3..50 end class User < ActiveRecord::Base ..... has_many :stories has_many :cores has_many :comments has_one :profile ...... end --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

