scinote-web/app/helpers/search_helper.rb

21 lines
491 B
Ruby
Raw Normal View History

2016-02-12 23:52:43 +08:00
module SearchHelper
def experiments_results(tag)
experiments = []
tag.my_modules.each do |mod|
experiments << mod.experiment
end
experiments.uniq
end
2016-10-11 22:16:48 +08:00
def route_to_other_org(path, search_org, text)
if search_org != current_organization
link_to text,
path,
data: { confirm: t('users.settings.changed_org_in_search',
team: search_org.name) }
else
link_to text, path
end
end
2016-02-12 23:52:43 +08:00
end