aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorRobin Houston <robin@lenny.robin>2011-06-23 06:18:37 +0100
committerRobin Houston <robin@lenny.robin>2011-06-23 06:18:37 +0100
commitf388281ea84653eb403fe481f0a8812b4ed10061 (patch)
tree13ebfa0942910842b5a8642575935e9205f80fcb /app/models
parent4ac1e9a0a0e56a53ca1e735069b554d73424984b (diff)
The error messages are clearly designed to be used *without* the
field name being prepended, so change the ApplicationHelper::foi_error_messages_for method to not prepend the field name, and add the field name back to the two messages from which we previously removed it.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/public_body.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb
index d5538fb6e..520e28aab 100644
--- a/app/models/public_body.rb
+++ b/app/models/public_body.rb
@@ -33,8 +33,8 @@ require 'set'
class PublicBody < ActiveRecord::Base
strip_attributes!
- validates_presence_of :name, :message => N_("can't be blank")
- validates_presence_of :url_name, :message => N_("can't be blank")
+ validates_presence_of :name, :message => N_("Name can't be blank")
+ validates_presence_of :url_name, :message => N_("URL name can't be blank")
validates_uniqueness_of :short_name, :message => N_("Short name is already taken"), :if => Proc.new { |pb| pb.short_name != "" }
validates_uniqueness_of :name, :message => N_("Name is already taken")