2016/01/25分のコミットです。
CHANGELOGへの追加はありませんでした。
Merge pull request #23081 from prathamesh-sonpatki/fix-cache-key-for-queries-with-offset
activerecord/lib/active_record/collection_cache_key.rb
の修正です。
cache
メソッドにcollectionを指定、かつcollectionのsizeが0だった場合に、cache
メソッドがNoMethodError - undefined method
[]' for nil:NilClass`で落ちてしまうバグがあったのを修正しています。
ActiveRecord::CollectionCacheKey::collection_cache_key
メソッドでcollectionのsizeが0だった場合の考慮が足りてなかった為、処理を追加し対応しています。
Add missing source_type if provided on hmt which belongs to an sti record
activerecord/lib/active_record/associations/has_many_through_association.rb
の修正です。
has_many through associationを使用した場合に、source_type
オプションが正しく処理されないバグがあったのを修正しています。
Fix AR::Relation#cache_key to remove select scope added by user
activerecord/lib/active_record/collection_cache_key.rb
n修正です。
ActiveRecord::CollectionCacheKey::collection_cache_key
メソッドでmax timestamp を取得する際、select
queryをunscope
で外すよう修正しています。
query = collection + .unscope(:select) .select("COUNT(*) AS size", "MAX(#{column}) AS timestamp") .unscope(:order) result = connection.select_one(query)
ユーザが独自に定義したselect
queryがそのままついてしまうと、queryがエラー(PG::GroupingError )になってしまう為、unscope
で外すようにしたとの事です。
Merge pull request #23185 from droptheplot/actioncable-custom-channels
actioncable/lib/action_cable/server/configuration.rb
の修正です。
Action Cableのchannelファイルのパスがapp/channels
固定だったのを、ユーザが独自に追加出来るよう対応しています。
値はActionCable.server.config.channel_load_paths
経由で設定出来ます。値がArrayになっているので複数path追加可能になっています。デフォルトは今ままで通りapp/channels
のみ。
Revert "Merge pull request #23218 from karlfreeman/bump_mail"
actionmailer/actionmailer.gemspec
の修正です。
mail
gemのバージョンを2.6系を使用するよう対応した、Bump mail gem constraint from [~> 2.5, >= 2.5.4] to ~> 2.6をrevertしています。
mail
gem 2.5系を使えないよう制限する必要は無いだろう、という事で、revertされたようです。
Merge pull request #23210 from sachin21/change_permission
guides/assets/javascripts/responsive-tables.js
の修正です。
ファイルのパーミッションを"0755"から"0644"に変更しています。
When verifying size of relation, also verify count is ok.
activerecord/test/cases/reflection_test.rb
の修正です。
has_many through associationを使用した場合にsource_type
オプションが正しく処理されないバグがあったのを修正した対応のテストで、associationのcount
メソッドを正しく呼び出せる事を確認するテストを追加しています。
Merge pull request #23208 from vipulnsward/testing-pass-2
rails guideのA Guide to Testing Rails Applications
の修正です。
guide全体のグラマーの修正、言い回しの修正等を行っています。
Merge pull request #23161 from schneems/schneems/fix-mysql-internalmetadata
activerecord/lib/active_record/internal_metadata.rb
の修正です。
active_record_internal_metadatas
テーブルのkeyカラムにlimitを指定するよう修正しています。limitの値は191byteです。
MySQLでutf8mb4を指定した場合の為の対応なのですが、limitの値固定で持つようにしちゃってるんですねえ。