2014/09/05分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Skip StatementCache for eager loaded associations (Fixes #16761)
ActiveRecordのassociation処理の修正です。
eager loadしたassociationについては、StatementCacheをスキップするよう修正しています。
以下のようなスコープを定義していた場合に、エラーが発生していたとの事です。
default_scope ->{includes([:state_course, :primary_subject_area, :district]).order('enabled desc, state_courses.name').references(:state_course) }
activemodel/examples/validations.rb
を削除しています。
サンプルはrails guideに載せる方針とする為、こちらのファイルは削除との事です。
Document that method objects are not duplicable?
rails guideのActive Support Core Extensions
の修正です。
`duplicable?``メソッドについて、methodsもduplicate出来ない旨説明を修正しています。
Time#change throws exception with an out-of-range :usec
activesupport/lib/active_support/core_ext/time/calculations.rb
の修正です。
Time#change
メソッドのusecに不正な値を指定した場合に、ArgumentError
を起こすよう修正しています。
Time.new(2005, 2, 22, 15, 15, 45, "-08:00").change(:usec => 1000000) #=> ArgumentError: argument out of range
Change "For not..." to "Do not...".
railties/lib/rails/generators/rails/app/templates/config/application.rb
のdocの修正です。
For
->Do
に修正しています。
:scissors: and from #16803 [ci skip]
rails guideのActive Support Core Extensions
の修正です。
説明上不要な"and"を削除しています。
always reorder bind parameters. fixes #15920
activerecord/lib/active_record/relation/query_methods.rb
の修正です。
build_arel
メソッドです、bindするパラメータを必ず並び替えしなすよう修正しています。
Load :developers fixtures where expecting a Developer to be there
activerecord/test/cases/relation/merging_test.rb
の修正です。
loadするfixturesにdevelopers
を追加しています。
Merge pull request #16699 from cristianbica/aj-refactor-queueing
ActiveJobのリファクタリングです。
コア部分をclassに切り出し、メソッド名の修正、パラメータ名の修正等を行っています。
deliver_later!/deliver_later
メソッドの引数名もさらっと変わってたりします。
# before Notifier.welcome(User.first).deliver_later!(in: 1.hour) Notifier.welcome(User.first).deliver_later!(at: 10.hours.from_now) # after Notifier.welcome(User.first).deliver_later!(wait: 1.hour) Notifier.welcome(User.first).deliver_later!(wait_until: 10.hours.from_now)
また、ActiveJobのメソッド名も変更になっています。
# before HelloJob.enqueue('david') # after HelloJob.perform_later('david')
betaとはいえ、一度出した後に割と大幅に変更が入りましたねえ。
Move variable assignment within logging block.
activejob/lib/active_job/logging.rb
の修正です。
ログ出力処理をブロックの中に移動しています。
cover all cases of For not
--> Do not
, related to #16804
activerecord/CHANGELOG.md
の修正です。
For not
->Do not
に説明を修正しています。
activejob/lib/active_job/test_helper.rb
のdocの修正です。
先に行われたActiveJobの対応に合わせて、docの修正を行っています。
Fixed regression with referencing polymorphic assoc in eager-load
ActiveRecordのassociationに関する修正です。
polymorphic associationを使用していた場合に、エラーが発生するリグレッションがあったのを修正しています。
以下のようなケースで問題が起きていたようです。
class Post < ActiveRecord::Base has_many :comments has_many :notes, as: :notable end class Note < ActiveRecord::Base belongs_to :notable, polymorphic: true end class Comment < ActiveRecord::Base belongs_to :post end Post.includes(:comments).order("comments.category").first Post.includes(:notes).order("notes.category").first
Freeze ADAPTER_NAME in adapters
ActiveRecordの各adapaterの修正です。
adapter名をfreezeするよう修正しています。値変更出来なくようにする為ですね。
For now, we will keep sorting the tests.
各ライブラリのRakefileの修正です。
テストを実行する際、各テストファイルをsortするよう修正しています。
元々sortは実施しており、このコミットでsort削除したのですが、まだsortは無いとまずい、という事で戻したようです。
world writable might be a bit too open...
railties/lib/rails/application/bootstrap.rb
の修正です。
ログファイルにアクセス出来なかった場合のエラーメッセージを少し修正しています。
- "Rails Error: Unable to access log file. Please ensure that #{path} exists and is chmod 0666. " + + "Rails Error: Unable to access log file. Please ensure that #{path} exists and is writable " + + "(ie, make it writable for user and group: chmod 0664 #{path}). " +