scinote-web/app/helpers/application_helper.rb

15 lines
284 B
Ruby
Raw Normal View History

2016-02-12 23:52:43 +08:00
module ApplicationHelper
2016-07-29 21:47:41 +08:00
def module_page?
controller_name == 'my_modules'
2016-02-12 23:52:43 +08:00
end
2016-07-29 21:47:41 +08:00
def experiment_page?
controller_name == 'experiments'
2016-02-12 23:52:43 +08:00
end
2016-07-29 21:47:41 +08:00
def project_page?
controller_name == 'projects' ||
(controller_name == 'reports' && action_name == 'index')
2016-02-12 23:52:43 +08:00
end
end