Fix case statement

Closes SCI-1335.
This commit is contained in:
Luka Murn 2017-06-13 09:09:07 +02:00
parent 481a48c953
commit c3d289291f

View file

@ -31,16 +31,15 @@ module SidebarHelper
end
def module_action_to_link_to(my_module)
case action_name
when 'results'
if action_name == 'results'
results_my_module_url(my_module)
when 'activities'
elsif action_name == 'activities'
activities_my_module_url(my_module)
when 'samples'
elsif action_name == 'samples'
samples_my_module_url(my_module)
when 'archive', 'module_archive', 'experiment_archive'
elsif action_name.in?(%w(archive module_archive experiment_archive))
archive_my_module_url(my_module)
when 'repository' && @repository
elsif action_name == 'repository' && @repository
repository_my_module_url(
id: my_module.id,
repository_id: @repository.id