Closed ochan1 closed 2 years ago
Starting inspiration: https://stackoverflow.com/questions/6596529/ruby-on-rails-how-to-sort-a-collection-select
During testing on that inspiration, it didn't work because the "@ officer" variable (without space) is an array
But since that line looks to be code and the above does work on Models, the array version of "order" is "sort"
https://stackoverflow.com/questions/5739158/rails-ruby-how-to-sort-an-array
Tested by running the line on a Rails console (in sandbox) and it sorts the first name Did not test on a front end because it was too annoying to import database for local, but if all checks out this is a simple fix to work
Starting inspiration: https://stackoverflow.com/questions/6596529/ruby-on-rails-how-to-sort-a-collection-select
During testing on that inspiration, it didn't work because the "@ officer" variable (without space) is an array
But since that line looks to be code and the above does work on Models, the array version of "order" is "sort"
https://stackoverflow.com/questions/5739158/rails-ruby-how-to-sort-an-array
Tested by running the line on a Rails console (in sandbox) and it sorts the first name Did not test on a front end because it was too annoying to import database for local, but if all checks out this is a simple fix to work