2017/09/27分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Passing a
Set
toRelation#where
now behaves the same as passing an array. - PostgreSQL
tsrange
now preserves subsecond precision
Merge pull request #30550 from tgxworld/fix_memoization_preload
Active Recordの修正です。
性能改善の対応として、primary_key
メソッドの呼び出し回数の軽減、及び、owner_keys
の生成処理を改善し、不要なmap
/ compact!
メソッドを呼び出さないよう修正、等を行っています。
Treat Set
as an Array
in Relation#where
activerecord/lib/active_record/relation/predicate_builder.rb
の修正です。
Relation#where
の引数にSet
クラスの値を渡せるよう修正しています。Set
が渡された場合、Array
が渡された場合と同じ挙動になります。
Merge pull request #30713 from yhirano55/add_a_space_to_refinery_cms
rails guideのGetting Started with Engines
の修正です。
RefineryCMS
をRefinery CMS
に修正しています。
Change :github git source for bug report templates
bug report templatesの修正です。
github
ショートハンドを使用した場合、https
を使用するよう修正しています。warningが表示されるのを避ける為。github
ショートハンドを使用していないファイルには不要そうな気も。
Don't generate foreign_type
if options[:polymorphic]
is not given
activerecord/lib/active_record/reflection.rb
の修正です。
Reflection::AssociationReflection#initialize
メソッドでoptions[:polymorphic]
が指定されている場合のみforeign_type
を生成するよう修正しています。
reflectionはassociationがpolymorphic associationのときのみforeign_type
を保持している為。
Remove unused cached_columns
and time_related_columns_on_topic
in AttributeMethodsTest
activerecord/test/cases/attribute_methods_test.rb
の修正です。
使用していないAttributeMethodsTest#cached_columns
、#time_related_columns_on_topic
メソッドを削除しています。
Remove unused code that was copied from actionpack
actionview/test/abstract_unit.rb
の修正です。
使用していないRails.env
メソッドの定義や、StubDispatcher
クラス等を削除しています。
Include ActionDispatch::DrawOnce
in ActiveSupport::TestCase
actionview/test/abstract_unit.rb
の修正です。
先のコミットでActionDispatch::DrawOnce
のinclude先をActiveSupport::TestCase
からActionController::TestCase
クラスに移動したいのですが、それだとエラーになるテストがある(ActiveSupport::TestCase
を親クラスにしているテストがある)為、ActiveSupport::TestCase
でincludeするよう戻しています。
Postgres::OID::Range
serializes to a Range
, quote in Quoting
activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb
、
activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
の修正です。
PostgreSQLのtsrange型を使用した場合に、subsecond precisionの値を保持するよう修正しています。
元々PostgreSQLとしてはsubsecondは保持できるようになっていたのですが、Rails側で正しく値を扱えてなかったのを修正しています。
Add test case for arel_attribute
with a custom table
activerecord/test/cases/relations_test.rb
、
activerecord/test/models/post.rb
の修正です。
custom table + arel_attribute
メソッドを使用した場合のテストを追加しています。
Ensure HashWithIndifferentAccess#transform_keys
to return HashWithIndifferentAccess
activesupport/lib/active_support/hash_with_indifferent_access.rb
の修正です。
HashWithIndifferentAccess#transform_keys
メソッドがHash
のインスタンスを返していたのを、HashWithIndifferentAccess
のインスタンスを返すよう修正しています。
HashWithIndifferentAccess#transform_values
や、#select
メソッドはHashWithIndifferentAccess
のインスタンスを返すようになっており、挙動を合わせる為。
Add newlines before/after the git_source
in bug report templates
bug report templatesの修正です。
git_source
の指定の前後に空行を入れるよう修正しています。
Merge pull request #30614 from kami-zh/yarn-on-bin-update
railties/lib/rails/generators/rails/app/templates/bin/update.tt
の修正です。
bin/update
のテンプレートファイルにbin/yarn
を実行する処理を追加しています。
<% unless options.skip_yarn? -%> # Install JavaScript dependencies if using Yarn # system('bin/yarn') <% end -%>
デフォルトではbin/setup
のテンプレートと同じく、コメントアウトされた状態です。