mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 21:21:50 +08:00
Change If statement to ternary operator [SCI-887]
This commit is contained in:
parent
50edaef4ff
commit
55d0e82fcd
1 changed files with 1 additions and 5 deletions
|
@ -70,11 +70,7 @@ class Experiment < ActiveRecord::Base
|
|||
.where('experiments.project_id IN (?)', projects_ids)
|
||||
.where_attributes_like([:name], a_query)
|
||||
.limit(Constants::ATWHO_SEARCH_LIMIT)
|
||||
if include_archived
|
||||
return new_query
|
||||
else
|
||||
return new_query.is_archived(false)
|
||||
end
|
||||
return include_archived ? new_query : new_query.is_archived(false)
|
||||
elsif include_archived
|
||||
new_query =
|
||||
Experiment
|
||||
|
|
Loading…
Reference in a new issue