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:
parent
797cbaab1e
commit
bdd5c317a7
3 changed files with 73 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue