diff options
Diffstat (limited to 'app/models/public_body_heading.rb')
-rw-r--r-- | app/models/public_body_heading.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/public_body_heading.rb b/app/models/public_body_heading.rb index 8e7a8ec3d..c38800561 100644 --- a/app/models/public_body_heading.rb +++ b/app/models/public_body_heading.rb @@ -58,6 +58,12 @@ class PublicBodyHeading < ActiveRecord::Base end end + def add_category(category) + unless public_body_categories.include?(category) + public_body_categories << category + end + end + def self.next_display_order if max = maximum(:display_order) max + 1 @@ -65,4 +71,5 @@ class PublicBodyHeading < ActiveRecord::Base 0 end end + end |