Adding some more diary entry tests. Making the RSS feed links more portable, by using the SERVER_URL constant. Fixing the validation for the length of the language of diary entries until the i18n branch is integrated.

This commit is contained in:
Shaun McDonald 2008-11-13 17:20:40 +00:00
parent 797cbaab1e
commit bdd5c317a7
3 changed files with 73 additions and 13 deletions

View file

@ -6,7 +6,7 @@ class DiaryEntry < ActiveRecord::Base
validates_presence_of :title, :body
validates_length_of :title, :within => 1..255
validates_length_of :language, :within => 2..3
validates_length_of :language, :within => 2..3, :allow_nil => true
validates_numericality_of :latitude, :allow_nil => true
validates_numericality_of :longitude, :allow_nil => true
validates_associated :user