X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/f0b2ed9bb6c1e153231b8088eabe6e3edcee9420..ede7f4af55247f3470c90ee5ba60bc53080130cd:/app/models/diary_entry.rb diff --git a/app/models/diary_entry.rb b/app/models/diary_entry.rb index 2a24d8002..4affe8b59 100644 --- a/app/models/diary_entry.rb +++ b/app/models/diary_entry.rb @@ -2,8 +2,8 @@ # # Table name: diary_entries # -# id :integer not null, primary key -# user_id :integer not null +# id :bigint(8) not null, primary key +# user_id :bigint(8) not null # title :string not null # body :text not null # created_at :datetime not null @@ -37,8 +37,8 @@ class DiaryEntry < ActiveRecord::Base scope :visible, -> { where(:visible => true) } - validates :title, :body, :presence => true - validates :title, :length => 1..255 + validates :title, :presence => true, :length => 1..255, :characters => true + validates :body, :presence => true, :characters => true validates :latitude, :allow_nil => true, :numericality => { :greater_than_or_equal_to => -90, :less_than_or_equal_to => 90 }