aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/public_body_heading.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/public_body_heading.rb')
-rw-r--r--app/models/public_body_heading.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/public_body_heading.rb b/app/models/public_body_heading.rb
index e9c854a7d..74f7a4374 100644
--- a/app/models/public_body_heading.rb
+++ b/app/models/public_body_heading.rb
@@ -3,10 +3,13 @@
# Table name: public_body_headings
#
# id :integer not null, primary key
-# locale :string
# name :text not null
#
class PublicBodyHeading < ActiveRecord::Base
has_and_belongs_to_many :public_body_categories
+
+ translates :name
+
+ validates_uniqueness_of :name, :message => N_("Name is already taken")
end