aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public_body_categories.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public_body_categories.rb')
-rw-r--r--lib/public_body_categories.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/public_body_categories.rb b/lib/public_body_categories.rb
new file mode 100644
index 000000000..3528e85b1
--- /dev/null
+++ b/lib/public_body_categories.rb
@@ -0,0 +1,11 @@
+# Allow the PublicBodyCategory model to be addressed using the same syntax
+# as the old PublicBodyCategories class without needing to rename everything,
+# make sure we're not going to break any themes
+class PublicBodyCategories
+
+ def self.method_missing(method, *args, &block)
+ warn 'Use of PublicBodyCategories is deprecated and will be removed in release 0.21. Please use PublicBodyCategory instead.'
+ PublicBodyCategory.send(method, *args, &block)
+ end
+
+end