mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 11:14:24 +08:00
Fix case statement
Closes SCI-1335.
This commit is contained in:
parent
481a48c953
commit
c3d289291f
1 changed files with 5 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue