Created
March 5, 2009 19:43
-
-
Save diegorv/74514 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Forum < ActiveRecord::Base | |
attr_accessible :name, :description | |
has_many :topics, :order => "created_at DESC", :dependent => :destroy | |
has_many :posts, :through => :topics | |
validates_length_of :name, :maximum => 255, :allow_nil => true | |
validates_length_of :description, :maximum => 1000, :allow_nil => true | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment