なるようになるブログ

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

rails commit log流し読み(2019/02/22)

2019/02/22分のコミットです。

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


Fix pluck and select with from if from has original table name

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

Fix pluck and select with custom attributesfromが使用されている場合に、カラム名をテーブルで修飾しないようpluckの挙動を修正した(selectの挙動と合わせる為)のですが、fromを指定した場合もテーブル名で修飾されている事を期待しているケースがある(issueの報告があった)為、fromに元のテーブル名が指定されていた場合、元の挙動通りテーブル名で修飾するよう修正しています。


Just skip test_select_with_subquery_in_from_uses_original_table_name on Travis

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

test_select_with_subquery_in_from_uses_original_table_nameのテストがローカルでは通るがTravis CIでは通らない、という問題があり、Travis上では一時的にskipするよう修正しています。


Merge pull request #35363 from rails/zeitwerk-1.3.0

activesupportrailtiesの修正です。

zeitwerkを1.3.0に更新しています。合わせて、不要になったログまわりの処理(zeitwerk側でやるから不要になった処理)を削除してます。


Allows rich_text_area_tag to add I18n translated placeholder text if placeholder option set to true

actiontext/app/helpers/action_text/tag_helper.rbの修正です。

Tags::ActionText classでTags::Placeholderableをincludeするよう修正しています。

rich_text_area_tagメソッドのplaceholderオプションでi18nを使用出来るようにする為。


Prefer I18n.with_locale

actionview/test/template/form_helper/form_with_test.rbactionview/test/template/form_helper_test.rbの修正です。

localeを一時的に変更する為に独自のメソッドにを使用していたのを、i18n gemが提供しているメソッド(I18n.with_locale)を使用するよう修正しています。


Skip test_select_with_subquery_in_from_uses_original_table_name on Buildkite as well

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

Travis上でskipするようにしたtest_select_with_subquery_in_from_uses_original_table_nameがbuildkite上でもエラーになっている為、buildkite上でもskipするよう修正しています。

ここではじめて触れたのですが、Railsのテストは今Buildkiteでもbuildが行われています。https://buildkite.com/rails/rails/builds/