summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers')
-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