なるようになるブログ

読書感想文かrailsについてかrubyについてか

rails commit log流し読み(2019/03/04)

2019/03/04分のコミットです。

CHANGELOGにのったコミットは以下の通りです。

activerecord/CHANGELOG.md


Fixed reselect throwing NoMethodError on ActiveRecord.

activerecord/lib/active_record/querying.rbの修正です。

Relationにdelegateするメソッドにreselectを追加しています。


Add an example about how to load images under app/javascript/images

railties/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.ttの修正です。

app/javascript/imagesにあるファイルをロードする場合のexampleを追加しています。


Correctly escape ERB tag

railties/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.ttの修正です。

先のapp/javascript/imagesにあるファイルをロードする場合のexampleでERBタグの記載方法に誤りがあったのを修正しています。


Move changelog entry about reselect method to the section of the next release

activerecord/CHANGELOG.mdの修正です。

reselectを追加した対応(Add reselect method. This is a short-hand for unscope(:select).select(fields).)のエントリーをファイルの先頭に移動しています。


Deprecate mismatched collation comparison for uniquness validator

Active Recordの修正です。

uniqueness validatorで、case insensitiveなcolumnに対しても強制的にcase sensitiveな比較を行っていたのがdeprecateになりました。Rails 6.1からは、case insensitiveなcolumnについては、case sensitiveな比較は行われなくなるようになります。引き続きcase sensitiveな比較を使用したい場合は、case_sensitive: trueオプションを指定すればOKです。

なお、影響があるのはMySQLのみです(sqlite3、PostgreSQLはデフォルトでcase sensitiveな為)。


Fix typo in CHANGELOG.md [ci skip]

activerecord/CHANGELOG.mdの修正です。

uniquenessuniqunessにタイポしていたのを修正しています。