2017/07/12分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Fix english for the rescue_from warning [ci skip]
rails guideのAction Controller Overview
の修正です。
rescue_from
についての注意文言の言い回しを修正しています。
Merge pull request #29748 from koic/enable_layout_empty_line_after_magic_comment
rubocop.yml
にLayout/EmptyLineAfterMagicComment
のcopを追加、及び各ファイルに設定を反映しています。
Merge pull request #29746 from kamipo/extract_fake_klass
activerecord/test/cases/relation/mutation_test.rb
、
activerecord/test/cases/relation_test.rb
の修正です。
relation_test.rb
、relation/mutation_test.rb
それぞれで定義していたテスト用のクラス(FakeKlass
)が、内容がほぼ同じだった為、共通で使用出来るよう別ファイルに切り出しています。
normalize_path used to be nil tolerant
actionpack/lib/action_dispatch/journey/router/utils.rb
の修正です。
Router::Utils.normalize_path
の引数にnil
を指定した場合NoMethodError
が発生してしまうバグがあったのを修正しています。
Fix configuring third-party cache stores such as ActiveSupport::Cache::RedisStore
activesupport/lib/active_support/cache.rb
の修正です。
retrieve_store_class
メソッドでcache store classのファイルを読み込む際、require_relative
を使用していたのをrequire
を使用するよう修正しています。
require_relative
だとthird-partyのライブラリの読み込みに失敗する為。
Merge pull request #29699 from lugray/represent_boolean_as_integer
Active Recordの修正です。
SQLite 3 adapterでbooleanの値を保持するのにStringのt
/ f
を使用していたのを、Integer(1
/ 0
)を使用するよう修正しています。
1と0はSQLite側でも true / falseと認識する為(t
/ f
ではtrue / falseとは認識されない)。
元々t
/ f
で保持していた値は、手動で移行する必要があります(e.g. ExampleModel.where("boolean_column = 't'").update_all(boolean_column: 1)
)。デフォルトではt
/ f
を使用するようになっており、Integerで値を保持するようにしたい場合は、ActiveRecord::ConnectionAdapters::SQLite3Adapter.represent_boolean_as_integer
にtrue
を指定すればOKです。