Created
October 27, 2009 04:24
-
-
Save romariorios/219317 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 Post < ActiveRecord::Base | |
belongs_to :post | |
has_many :replies, :class_name => "Post" | |
validates_length_of :title, :maximum => 32, :allow_nil => false, :allow_blank => false, :too_short => "Please, enter a title.", :too_long => "Title is too long. Enter a shorter title." | |
validates_length_of :text, :maximum => 10240, :allow_nil => false, :allow_blank => false, :too_short => "Please, enter a text", :too_long => "Text is too long. Enter a shorter text." | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment