Compare commits
1 commit
main
...
search-rel
| Author | SHA1 | Date | |
|---|---|---|---|
| 2eb724a17c |
1 changed files with 3 additions and 3 deletions
|
|
@ -72,7 +72,7 @@ module Api
|
||||||
Character.en_search(search_params[:query]).where(conditions)
|
Character.en_search(search_params[:query]).where(conditions)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Character.where(conditions)
|
Character.where(conditions).order(Arel.sql('greatest(release_date, flb_date, ulb_date) desc'))
|
||||||
end
|
end
|
||||||
|
|
||||||
count = characters.length
|
count = characters.length
|
||||||
|
|
@ -110,7 +110,7 @@ module Api
|
||||||
Weapon.en_search(search_params[:query]).where(conditions)
|
Weapon.en_search(search_params[:query]).where(conditions)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Weapon.where(conditions)
|
Weapon.where(conditions).order(Arel.sql('greatest(release_date, flb_date, ulb_date) desc'))
|
||||||
end
|
end
|
||||||
|
|
||||||
count = weapons.length
|
count = weapons.length
|
||||||
|
|
@ -143,7 +143,7 @@ module Api
|
||||||
Summon.en_search(search_params[:query]).where(conditions)
|
Summon.en_search(search_params[:query]).where(conditions)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Summon.where(conditions)
|
Summon.where(conditions).order(release_date: :desc).order(Arel.sql('greatest(release_date, flb_date, ulb_date, xlb_date) desc'))
|
||||||
end
|
end
|
||||||
|
|
||||||
count = summons.length
|
count = summons.length
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue