2014/05/09分のコミットです。
has_and_belongs_to_many
を使用している際に、Mashal.dump
がエラーになっていたバグを修正しています。
set a constant for the "anonymous" habtm model fixes #15022
ActiveRecord::Associations#has_and_belongs_to_many
メソッドの修正です。
has_and_belongs_to_many
を設定いしているmodelをMashal.dump
するとエラーになっていたバグを修正しています。
class User < ActiveRecord::Base has_and_belongs_to_many :roles, class_name: 'Role', join_table: 'users_roles' end class Role < ActiveRecord::Base end Marshal.dump User.includes(:roles).first # TypeError: can't dump anonymous class #<Class:0x00000108cd32b0>
habtm先のクラス名を保持してなかったのが問題だったようです。
add more tests around the polymorphic url api
actionview/test/activerecord/polymorphic_routes_test.rb
の修正です。
polymorphic_url
メソッドのテストケースを追加しています。
[ci skip] Minor improvements on routing.md.
rails guideのRails Routing from the Outside In
ページの修正です。
スペースいれたり、リンクの書き方をMarkDown方式にしたり、と細かい修正の対応をしています。
activesupport/lib/active_support/core_ext/hash/conversions.rb
のdocの修正です。a
-> an
に修正。
add tests for the polymorphic_path method
actionview/test/activerecord/polymorphic_routes_test.rb
の修正です。
polymorphic_path
メソッドのテストを追加しています。
add a test for classes with options
こちらもactionview/test/activerecord/polymorphic_routes_test.rb
の修正です。
polymorphic_url
、polymorphic_path
メソッドにオプションがある場合のテストケースを追加しています。
don't manipulate the testclass, just add helpers to the instance
こちらもactionview/test/activerecord/polymorphic_routes_test.rb
の修正です。
include
を使って@routes.url_helpers
をミックスインしているのをextend
に修正しています。
Test Class自体はいじらないように、オブジェクトにミックスインするようにしたのですね。
add tests for path based url_for calls
こちらもactionview/test/activerecord/polymorphic_routes_test.rb
の修正です。
test_symbol
メソッドでpolymorphic_path
のテストを行うよう修正しています。
また、テスト用にPolymorphicPathRoutesTest
クラスを新設しています。こっちは、まだ使ってないような。