Skip to content

Instantly share code, notes, and snippets.

@glebm
Created October 9, 2010 23:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glebm/618725 to your computer and use it in GitHub Desktop.
Save glebm/618725 to your computer and use it in GitHub Desktop.
class NewsStory < ActiveRecord::Base
has_many :comments, :as => :commentable, :dependent => :destroy
belongs_to :user
validates_presence_of :body, :title
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment