diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-10-09 14:18:25 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-10-09 14:18:25 +0100 |
commit | 3a33c84d03fe50ddc477b3a36273b05e9ff5cf79 (patch) | |
tree | 8a7dab1c860c1a76f6d5d559a103d738f2a8ba95 /lib | |
parent | 74c6bd917e12e5d05611566df42b8adb1b4411b8 (diff) |
Remove old PublicBodyCategories calls.
Add deprecation notice to draw attention to any place where
PublicBodyCategories is called from themes.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/public_body_categories.rb | 11 |
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 |