summaryrefslogtreecommitdiff
path: root/app/helpers/application_helper.rb
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2013-08-13 10:37:31 -0700
committerjessib <jessib@riseup.net>2013-08-13 10:37:31 -0700
commitd0a15a50e1fdf08f2283562453d4e803aa7b31c8 (patch)
tree422cabeee1629d823a91e3415d8abf53f44214aa /app/helpers/application_helper.rb
parent1bdf34b4bda5af84bd6df44d4e718ea19667682c (diff)
Option to disable billing engine and hide billing related links. To actual disable, must remove billing engine from Gemfile (and re-bundle)
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 1e79990..cdc34ea 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -37,4 +37,9 @@ module ApplicationHelper
html_escape(msg).gsub('[b]', '<b>').gsub('[/b]', '</b>').html_safe
end
+ def engine_enabled(name)
+ # to disable engine, comment it out in Gemfile (and make sure to re-run bundle install)
+ Rails::Application::Railties.engines.any? {|eng| eng.class.to_s == "#{name}::Engine"}
+ end
+
end