なるようになるブログ

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

rails commit log流し読み(2014/11/10)

2014/11/10分のコミットです。

CHANGELOGへの追加はありませんでした。


Ensure HABTM relationships produce valid class names (Fixes #17119)

activerecord/lib/active_record/associations.rbactiverecord/lib/active_record/associations/builder/has_and_belongs_to_many.rbの修正です。

has_and_belongs_to_manyclass_nameオプションを使用していた際に、class_nameに指定して値が使用されていなかったバグがあったのを修正しています。


added description for rails generators, and fixed sentence formation for active_support/notifications [ci skip]

railties/lib/rails/commands/destroy.rbrailties/lib/rails/commands/generate.rbのdocの修正です。

"-h", "--help"オプションがrails generatorに渡された場合の動作についての説明を追加しています。


Revert the behavior of booleans in string columns to that of 4.1

activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rbactiverecord/lib/active_record/type/string.rbの修正です。

Stringの型のカラムにbooleanの値を格納した際、Rails 4.1までは"t"/"f"が格納されていたのですが、Rails 4.2では"1"/"0"が格納されていました。

その為、元の挙動に戻す為、trueの場合は"t"を、falseの場合は"f"を返すよう修正しています。

因みに、そもそもStringのカラムにbooleanの値を入れるのがおかしいのでは、という話があり、Rails 5ではその辺りの挙動を修正する予定との事です。


Pass the route name explicitly

actionpack/lib/action_controller/test_case.rbactionpack/test/controller/test_case_test.rbの修正です。

こちらのコミットから、UrlHelperインスタンス生成処理を行う際はroute_nameを明示的に渡す必要が出来たのですが、その対応が漏れてたテストがあったので、route_nameを明示的に渡すよう修正しています。


Remove useless only_path: true in path helpers https://github.com/rails/rails/commit/6625000b73f520abf6e0afbd5a6dde8d6b06b7cc

actionpack/test/controller/url_for_test.rbの修正です。

使用していないonly_pathオプションを削除しています。


docs, minor changes in Active Job documentation. [ci skip]

ActiveJobのdocの修正です。

ActiveJob::QueueAdaptersAPI docへのリンクの追加、タイポの修正等を行っています。


Fixes a bug found when running individual tests against #17217 after merging

activerecord/test/cases/validations/uniqueness_validation_test.rbの修正です。

先にあった、Ensure HABTM relationships produce valid class names (Fixes #17119)の対応で壊れてしまったテストがあったのを修正しています。