2016/10/28分のコミットです。
CHANGELOGへの追加はありませんでした。
Fixes an issue where time_zone_conversion that causes an exception in ARs delegation
activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb
の修正です。
ActiveRecord::AttributeMethods::TimeZoneConversion.inherited
メソッドで、メソッドの最後にsuper
で親クラスのメソッドを呼び出していたのを、メソッドの最初に呼び出すよう修正しています。
def inherited(subclass) + super # We need to apply this decorator here, rather than on module inclusion. The closure # created by the matcher would otherwise evaluate for `ActiveRecord::Base`, not the # sub class being decorated. As such, changes to `time_zone_aware_attributes`, or @@ -80,7 +81,6 @@ def inherited(subclass) TimeZoneConverter.new(type) end end - super end
最初に呼んでおかないと、abstract modelでinherited
メソッドを定義した際に、NoMethodError
が発生してしまう問題があった為修正したとの事です。schemaが正しく取得出来てないから、とかですかねえ。
Permit loads while queries are running
Active Recordの修正です。
DBに対するqueryの実行中に、load処理が実行出来るよう修正しています。
一部抜粋。
- log(sql, name) { @connection.query(sql) } + log(sql, name) do + ActiveSupport::Dependencies.interlock.permit_concurrent_loads do + @connection.query(sql) + end + end
queryの実行時にはDBでのlockが発生する為、load処理を実行出来るようにしておかないと、スレッド間でdeadlockが発生する可能性がある為、のようです。
Merge pull request #23770 from meinac/fix_habtm_symbol_class_name
activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb
の修正です。
has_and_belongs_to_many
メソッドのclass_name
オプションにClass、Symbolの値を指定した場合に正しく動作しないバグがあったのを修正しています。
内部的にはStringを指定する必要があった為、値を使用する際にStringに変換してから使用するよう修正しています。
Fix :stopdoc: to :startdoc: [ci skip]
actionpack/lib/action_dispatch/journey/formatter.rb
のdocの修正です。
:startdoc:
を指定すべき箇所に、:stopdoc:
を指定してまっていたのを修正しています。
Explicitly show --no-helper and --no-assets options in help message
railties/lib/rails/generators/rails/controller/controller_generator.rb
の修正です。
Rails::Generators::ControllerGenerator
クラスのclass_option
にhelper
とassets
を追加しています。
controllerのhelpメッセージに上記オプションに関する情報が出るようにする為、との事です。
Add documentation for config.assets.version
[skip ci]
rails guideのConfiguring Rails Applications
の修正です。
config.assets.version
optionについての説明を追加しています。
[ci skip] Revise TagHelper only permitting symbols doc.
actionview/lib/action_view/helpers/tag_helper.rb
のdocの修正です。
ActionView::Helpers::TagHelper#tag
メソッドのdoc内の、options
のattribute namesにはSymbolしか使用出来ない旨説明している箇所の言い回しを修正しています。
Merge pull request #26688 from kamipo/remove_respond_to_indexes
activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
、
activerecord/test/cases/adapter_test.rb
の修正です。
connection adapterにindexes
メソッドが定義されているかどうかチェックしている処理を削除しています。全てのconnection adapterでindexes
メソッドは実装されており、チェックする必要は無い為。