2015/11/16分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
rails guideのA Guide to Testing Rails Applications
の修正です。
Testing Time-Dependent Code
の項について、time
関する処理についての説明を削除、コードサンプル内にあった実行結果の例の削除、等を行っています。
Remove not needed NATIVE_DATABASE_TYPES
entries
activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
、
activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
の修正です。
AbstractMysqlAdapter
のNATIVE_DATABASE_TYPES
から重複して定義されていたblob
、及びbigint
を。PostgreSQLAdapter
のNATIVE_DATABASE_TYPESから
bigint、
bigserial`をそれぞれ削除しています。
bigint
、bigserial
は定義はされていたものの、実際は使われていない(rails 内部ではlimit付きの
integer`にマッピングされている)為、削除したとの事です。
Freeze association foreign keys to reduce allocations
activerecord/lib/active_record/reflection.rb
の修正です。
Reflection#foreign_key
メソッドで、derive_foreign_key
メソッドから取得した外部キーの値をfreeze
するよう修正しています。
Make the static_index
config part of the config.public_server
config
railties/lib/rails/application/configuration.rb
、
railties/lib/rails/application/default_middleware_stack.rb
の修正です。
インデックスファイル名を指定する為のconfig名を、config.static_index
-> config.public_file_server.index_name
に変更しています。
config.serve_static_files
がconfig.public_file_server.enabled
が変更になったのに合わせて、こちらも変更したとの事です。
Except keys of build_record
's argument from create_scope
in initialize_attributes
activerecord/lib/active_record/associations/association.rb
の修正です。
collection.build
メソッドでattributesを指定した場合に、そのattributesの値が、scope
で定義されたattributesの値を上書き出来なかったのを上書き出来るよう修正しています。
[2015/11/20 修正]
dbでデフォルト値があるカラムを上書きするようなscopeをもったアソシエーションのbuildに、デフォルト値を与えるときに、上書き出来なかったのを上書き出来るよう修正しています、との事です。
[/2015/11/20 修正]
issueより。
class Post < ActiveRecord::Base has_many :comments_with_scope, -> { active }, class_name: 'Comment' has_many :comments_with_hash_condition, -> { where(flag: true) }, class_name: 'Comment' has_many :comments_with_sql_condition, -> { where('flag is true') }, class_name: 'Comment' end class Comment < ActiveRecord::Base belongs_to :post scope :active, -> { where(flag: true) } end
Post.create!.comments_with_scope.build(flag: false).flag # => 元々`true`になってしまっていたのを、`false`になるよう修正
Use proper syntax for class method reference.
activesupport/CHANGELOG.md
の修正です。
Time.days_in_year
メソッドを追加した対応のエントリーで、メソッド名がインスタントメソッド表記(Time#days_in_year
)になってしまっていたのを、クラスメソッド(Time.days_in_year
)に修正しています。