-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite BsRequest query methods as scopes
These methods where used to query requests that contain reviews that match the query attributes. All of this can be done withActiveRecord::QueryMethods and a few scopes. This also required a change of how we ordered requests in the staging controller, since we couldn't use the Array#sort anymore. A nice side-effect of this is that we now do the request sorting as part of the SQL query. Co-authored-by: Dany Marcoux <dmarcoux@suse.com>
- Loading branch information
Showing
4 changed files
with
16 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters