2014/06/26分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
activemodel/CHANGELOG.md
Move behavior of read_attribute
to AttributeSet
ActiveRecordの修正です。
read_attribute
メソッドの処理をAttributeSet
に移譲したのと、AttributeSet::Builder
クラスを別ファイルに切り出しています。
synchronize Active Record deprecations / removals with 4.2 release notes
guides/source/4_2_release_notes.md
の修正です。
ActiveRecordのremove / deprecate になるメソッドについて追記しています。
徐々に4.2の準備が。
sync deprecations and removals with 4.2 release notes. [ci skip]
同じくguides/source/4_2_release_notes.md
の修正です。
こちらは、ActionViewとActiveModelのメソッドについです。
docs, fix BacktraceCleaner code example. Closes #15911. [ci skip]
activesupport/lib/active_support/backtrace_cleaner.rb
のdocの修正です。
exampleの処理が誤っていたのを修正しています。
Merge pull request #15846 from sgrif/sg-attributes-before-type-cast
activerecord/lib/active_record/attribute_methods/before_type_cast.rb
、activerecord/lib/active_record/attribute_set.rb
の修正です。
attributes_before_type_cast
メソッドの処理をAttributeSet
クラスに移譲しています。
Merge pull request #15847 from sgrif/sg-encapsulate-result-types
ActiveRecordの修正です。
type objectsに関する処理をActiveRecord::Result
クラスに集約しています。リファクタリングですね。
Encapsulate the creation of Attribute
objects
ActiveRecordの修正です。
Attribute
オブジェクトの生成処理を隠蔽するよう修正しています。
プロパティ追加の際の処理を楽にするため、のようです。
Require shellwords since it is dependecy of this file
railties/lib/rails/generators/testing/assertions.rb
の修正です
require 'shellwords'
を追加しています。
Merge pull request #15834 from rmehner/allow_proc_and_symbol_for_only_integer
activemodel/lib/active_model/validations/numericality.rb
の修正です。
NumericalityValidator
のonly_integer
の値にSymbol
、Proc
クラスを指定出来るよう修正しています。
テストコードから抜粋。
Topic.send(:define_method, :allow_only_integers?, lambda { false }) Topic.validates_numericality_of :approved, only_integer: Proc.new {|topic| topic.allow_only_integers? }
Procクラス指定出来るのは割と便利そうな。
Merge pull request #15845 from robin850/jruby-isolation
activesupport/lib/active_support/testing/isolation.rb
の修正です。
JRubyでisolationのテストが動くために対応しているとの事です。JRuby…!
Attribute
should know about its name
ActiveRecordのattribute関連のクラスを修正してます。
Attribute
クラスの各メソッドの引数にname
を追加しています。
Deprecate automatic counter caches on has_many :through
ActiveRecordのassociations関連のクラスの修正です。
has_many :through
アソシエーションを使用している場合にcounter cacheを使用するのはdeprecateになりました。 5系で削除予定。
そもそも、has_many :through
の場合のcounter cacheはドキュメントに無い振る舞いだったとの事です。
has_many
アソシエーションについては変わらず使用できます。
Consolidate testing of update_all type casting
ActiveRecordのテストの修正です。
update_all
のテストをactiverecord/test/cases/relation_test.rb
にまとめています。