2014/07/05分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Fixed error in
reset_counters
when associations haveselect
scope. - Add a
required
option to singular associations
Merge pull request #16011 from xjlu/token_and_options
actionpack/lib/action_controller/metal/http_authentication.rb
の修正及びHttpAuthentication::Token
のテストの追加です。
raw_params
メソッドの引数分割用の正規表現を修正しています。
- auth.sub(TOKEN_REGEX, '').split(/"\s*#{AUTHN_PAIR_DELIMITERS}\s*/) + auth.sub(TOKEN_REGEX, '').split(/\s*#{AUTHN_PAIR_DELIMITERS}\s*/)
PRのコメント見る限り、そもそもダブルクォートがあったの自体が誤りのようです。
Merge pull request #16028 from cade/fix_counter_cache_count_with_association_selects
activerecord/lib/active_record/counter_cache.rb
の修正です。
select
scopeを使用している際に、reset_counters
メソッドがエラーになっていたのを修正しています。
生成されるSQLがおかしくなってしまっていたとの事で、count
メソッドの引数に:all
を使用するよう修正しています。
Merge pull request #16003 from sgrif/sg-refactor-sqlite3-strings
activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
の修正です。
String用のSQLite3String
クラスを新設し、type cast処理をまとめています。 また、そのSQLite3String
クラス生成用のFactoryも追加しています。
Merge pull request #16013 from tgxworld/remove_symbolized_path_parameters
actionpackの各クラスの修正です。symbolized_path_parameters
を削除しています。代わりにpath_parameters
を使用すべきとの事です。
activerecord/test/cases/adapters/postgresql/quoting_test.rb
の修正です。
FORM
をFROM
に修正しています。typo。
Don't fail if unicode.org isn't talking to us
activesupport/test/multibyte_conformance_test.rb
の修正です。
MultibyteConformanceTest
では、http://www.unicode.orgからファイルをダウンロードしてテストを行っているのですが、unicode.orgが応答無かった場合、テストをskipするよう修正しています。
unicode.orgから動的にファイルをダウンロードしてテストを実行していたんですね。なる程。
Revert "Use a type object for type casting behavior on SQLite3"
上にあるSQLite3String
クラスの対応をrevertしています。Travis CIでテストがコケてしまった為のようです。
Add a required
option to singular associations
ActiveRecordのassociations
の修正です。singular associations用に required
オプションが追加されました。
# before belongs_to :account validates_presence_of :account # after belongs_to :account, required: true
スッキリして非常に良いですね。使っていこう。
CHANGELOG and release notes entry for #16056
activerecord/CHANGELOG.md
の修正です。
上記required
の対応について追記しています。
Add release notes entry for #15819 [ci skip]
guides/source/4_2_release_notes.md
の修正です。
Hash#transform_values
、Hash#transform_values!
の対応を追記しています。
Use the type object for quoting PG Ranges
PostgreSQLのConnectionAdapterの修正です。
Range型のクォート処理をtype objectに集約しています。
Time.today
-> Date.today
in guides. [ci skip]
rails guideのActive Support Core Extensions
の修正です。
日時比較処理についての説明が誤っていたのを修正しています。あれ、"Date.today
may equal Date.yesterday
"というのはおかしいきが。
Remove all references to Time.yesterday
[ci skip]
こちらもrails guideのActive Support Core Extensions
の修正です。
Time.yesterday
、Time.tomorrow
をそれぞれDate.yesterday
、Date.tomorrow
に修正しています。
Only reference time specific methods in the time section [ci skip]
再度rails guideのActive Support Core Extensions
の修正です。
日時比較処理についての説明が誤っていたのを修正しています。 "Date.today
may equal Date.yesterday
"の件も修正されていました。