OSDN Git Service

t#30277:change valid message for url
[pettanr/pettanr.git] / app / models / license.rb
index b34e351..ff138c1 100644 (file)
@@ -6,7 +6,7 @@ class License < ActiveRecord::Base
   validates :license_group_id, :presence => true, :numericality => true, :existence => {:both => false}
   validates :name, :presence => true, :length => {:maximum => 50}
   validates :caption, :presence => true, :length => {:maximum => 30}
-  validates :url, :presence => true, :length => {:maximum => 200}, :uniqueness => true, :url => true #{:allow_blank => true}
+  validates :url, :presence => true, :length => {:maximum => 200}, :uniqueness => true, :url => {:message => I18n.t('errors.messages.url')} #{:allow_blank => true}
   validates :system_picture_id, :presence => true, :numericality => true, :existence => {:both => false}
   
   def supply_default