You could add a helper method in Forem::ApplicationController
by reopening the class:
Forem::ApplicationController.class_eval do
def forem?
true
end
helper_method :forem?
end
Add the above file in app/decorators/forem/application_controller_decorator.rb
for example.
This way every time a view is rendered by Forem's controller you would be able to call forem?
within your view.
application.html.erb
<% if forem? %>
# do something
<% end %>
You might want to check if the current instance respond_to?(:forem?)
first, or add a forem?
method returning false
in your own application_controller.rb
.