openstreetmap-website/app/controllers
Andy Allan 1700c23dd1 Prefer find_by() instead of where().first
These are very similar, differing only if we would expect multiple
results and the sorting is important. However, in all our cases
we're only expecting one result to be returned, and so find_by is
easier to read.
2023-10-04 17:53:58 +01:00
..
account Allow users to delete their own accounts 2022-02-09 16:15:24 +00:00
api Prefer find_by() instead of where().first 2023-10-04 17:53:58 +01:00
concerns Drop non-functional check for nil email 2023-09-02 11:51:43 +01:00
accounts_controller.rb Allow users to delete their own accounts 2022-02-09 16:15:24 +00:00
api_controller.rb Handle timeouts inside a view for API calls 2023-09-07 00:32:11 +01:00
application_controller.rb Prefer find_by() instead of where().first 2023-10-04 17:53:58 +01:00
browse_controller.rb Move browse#note to notes#show 2023-02-01 17:13:41 +00:00
changeset_comments_controller.rb Prefer keyword arguments when method has optional boolean arguments 2020-11-12 11:24:44 +00:00
changesets_controller.rb Avoid using _id in queries 2023-08-30 17:08:16 +01:00
confirmations_controller.rb Move user lookup and error render to concerns 2023-08-21 17:29:55 +03:00
dashboards_controller.rb Split the non-public information off of the profile page 2021-08-18 13:32:36 +01:00
diary_entries_controller.rb Prefer find_by() instead of where().first 2023-10-04 17:53:58 +01:00
directions_controller.rb Use CanCanCan for directions controller 2019-01-09 10:12:14 +01:00
errors_controller.rb Set the locale when rendering a generic error page 2023-03-12 16:10:14 +00:00
export_controller.rb Mark redirects which need to be open with allow_other_host 2022-03-09 22:43:02 +00:00
friendships_controller.rb Merge pull request #4193 from AntonKhorev/lookup-friend 2023-08-30 15:17:11 +01:00
geocoder_controller.rb Take exclude_place_ids from Nominatim results directly 2023-08-08 18:27:53 +01:00
issue_comments_controller.rb Fix predicate method names in the user model 2023-08-15 18:53:14 +01:00
issues_controller.rb Avoid using _id in queries 2023-08-30 17:08:16 +01:00
messages_controller.rb Use Activerecord '#or' method for queries 2023-08-30 17:17:15 +01:00
notes_controller.rb Lookup user before action in user's notes list 2023-08-21 17:31:59 +03:00
oauth2_applications_controller.rb Introduce privileged scopes that only an administrator can enable 2021-08-26 17:22:24 +01:00
oauth2_authorizations_controller.rb Restore form_action restrictions for ouath2_authorizations#create 2022-01-17 11:00:41 +00:00
oauth2_authorized_applications_controller.rb Add support for OAuth2 using doorkeeper 2021-05-18 12:05:32 +01:00
oauth_clients_controller.rb Fix new rubocop warnings 2022-11-22 18:32:02 +00:00
oauth_controller.rb Mark redirects which need to be open with allow_other_host 2022-03-09 22:43:02 +00:00
passwords_controller.rb Fix new rubocop warnings 2022-11-22 18:32:02 +00:00
preferences_controller.rb Fix new rubocop warnings 2022-09-09 22:45:58 +01:00
profiles_controller.rb Fix new rubocop warnings 2022-09-09 22:45:58 +01:00
redactions_controller.rb Enable the ActionOrder cop for remaining controllers 2022-11-02 11:06:00 +00:00
reports_controller.rb Add database checks to issue and report controllers 2023-01-11 11:12:36 +00:00
sessions_controller.rb Fix new rubocop warnings 2022-11-22 18:32:02 +00:00
site_controller.rb Facelift offline.html and use Bootstrap classes for "notifications" 2023-03-26 13:57:51 +03:00
traces_controller.rb Prefer find_by() instead of where().first 2023-10-04 17:53:58 +01:00
user_blocks_controller.rb Move user lookup and error render to concerns 2023-08-21 17:29:55 +03:00
user_roles_controller.rb Avoid using _id in queries 2023-08-30 17:08:16 +01:00
users_controller.rb Move email-related methods to mixin 2023-09-02 13:43:41 +03:00