Why is Ruby on Rails' default_scope bad?
2020-01-06
(Last Updated:
2022-02-10)
A pretty popular opinion in the Ruby on Rails community is that default_scopes should not be used for any reason. However, often it's not fully explained why default_scopes are harmful to applications. Default Scopes are harmful because they are unexpected and hard to unscope.
Solved: ActionController::ParameterMissing (param is missing or the value is empty)
2020-01-02
(Last Updated:
2020-01-06)
When using Ruby on Rails' strong_params with require, there is a chance the key doesn't exist. When this happens, an ActionController::ParameterMissing exception is thrown.
Solved: Warning: Using the last argument as keyword parameters is deprecated
2020-01-02
(Last Updated:
2020-05-20)
Ruby 2.7 deprecated the use of hashes in the last argument of a method call. Fix this warning by removing the curly braces or adding a hash splat (**) to a variable argument.
Rails: How to Use Greater Than/Less Than in Active Record where Statements
2019-12-30
(Last Updated:
2020-01-06)
When querying ActiveRecord for greater than and less than, most people turn to including raw SQL in their codebase... But raw SQL isn't required!