なるようになるブログ

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

rails commit log流し読み(2016/12/01)

2016/12/01分のコミットです。

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

activerecord/CHANGELOG.md


Correct deprecation warnings in ActiveRecord::Dirty

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

ActiveRecord::Dirtyでdeprecatedになったメソッドを使用した場合のメッセージで、変更後のメソッド名に誤りがあったのを修正しています。


Make the second argument to attribute optional

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

ActiveRecord::Base#attributeの第二引数(cast_type)をオプショナルに修正しています。デフォルトはActiveRecord::Type::Value.newになっています。

attr_accessorと同じような使い方でattributeを使えるようにする(attr_accessor :fooattribute :foo)為に対応したようです。


Fix arguments passing in testing isolation

activesupport/lib/active_support/testing/isolation.rbの修正です。

ActiveSupport::Testing::Isolation moduleでテストを複数まとめて実行する時に、引数全体をクォートするようになっていたのですが、それだと全体がまとめて一つの引数とみなされてしまっていた為、クォートしないよう修正しています。


Fixes #27202, [ci skip]

rails guideのForm Helpersの修正です。

既に存在しないoptions_for_selectメソッドの第二引数についての説明を削除しています。


Fix issue number from becoming markdown header

activerecord/CHANGELOG.mdの修正です。

頭が#からはじまっていた行を、行の先頭が#にならないよう修正しています。

-    The force reloading of the association reader was deprecated in
-    #20888. Unfortunately the suggested alternative of
+    The force reloading of the association reader was deprecated
+    in #20888. Unfortunately the suggested alternative of
     `article.reload.category` does not expose the same behavior.

先頭が#になってしまうと、Headerと認識されてしまい、表示がおかしくなってしまう(h1タグとして表示されてしまう)為。