2014/05/17分のコミットです。
CHANGELOGにのったコミットは以下の通りです(詳細は本文参照)。
- Allow custom asset host to be passed in asset_url
- Restrict deletion of record when using
delete_all
withuniq
,group
,having
oroffset
. - Add support for counter name to be passed as parameter on
CounterCache::ClassMethods#reset_counters
.
- Fixed
ActiveSupport::Subscriber
so that no duplicate subscriber is created when a subscriber method is redefined.
fixed a typo [ci skip] https://github.com/rails/rails/commit/812b4e88b753e50a0d91d6fa5bd6f24ff018b47c
actionpack/lib/abstract_controller/url_for.rb
の修正です。
エラーメッセージにドットを追加しています。
Document conflicts in db/schema.rb
[ci skip]
https://github.com/rails/rails/commit/b48bc869fa55a1b4622ca316a9b62b6da901402f
rails guideのActive Record Migrations
のページの修正です。
db/schema.rb
がコンフリクトした場合の対応について記述を追加しています。因みに、手動でコンフリクトを解決しての、との事。
Remove code related to adapter which are no longer in repo
activerecord/Rakefile
の修正です。
現状対応していないDB Adapterの記述を削除しています。
削除されたのは、firebird、frontbase、sybaseです。
Our test suite isn't ready to run in random order yet :cry:
Gemfile
の修正です。minitestのバージョンを5.3.4
以下に指定しています。
minitestでtest suiteがランダムに実行されるようになったようです。コミットはこちら。
で、railsがまだランダムに実行されるのに対応してないので、バージョンの指定をした、という事のようです。
minitestのこの修正、また影響が大きそうな…。
Merge pull request #15021 from hubertlepicki/allow_custom_host_in_asset_url
actionview/lib/action_view/helpers/asset_url_helper.rb
の修正です。
asset_url
メソッドhost
オプションを渡した場合、config.action_controller.asset_host
の値を上書きするよう修正しています。
asset_url "application.js" # => http://example.com/application.js asset_url "application.js", host: "http://cdn.example.com" # => http://cdn.example.com/javascripts/application.js
CDN使用する場合に重宝しそう。
Add a specific method to force the transaction record state clear
activerecord/lib/active_record/transactions.rb
の修正です。
昨日行われたトランザクション処理のリファクタリングを更に修正しています。
よく呼ばれる処理については手を入れず、追加部分については別メソッドにしています。
activerecord/lib/active_record/transactions.rb
の修正です。
上のコミットでif
が漏れてしまっていたので、追加しています。
Reuse the force_clear_transaction_record_state
こちらもactiverecord/lib/active_record/transactions.rb
の修正です。
追加したforce_clear_transaction_record_state
メソッドを違う箇所でも使用するよう修正しています。
prepend mutates the string so we can remove the assignment
activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb
の修正です。
不要な代入処理を削除しています。
Remove the assignment for real this time.
activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb
の修正です。
こちらも不要な代入処理の削除。
activerecord/lib/active_record/transactions.rb
の修正です。
不要なrequire 'thread'
を削除しています。
remove trailing whitespace. [ci skip]
guides/source/caching_with_rails.md
及びguides/source/upgrading_ruby_on_rails.md
の修正です。
不要なスペースの削除。
doc, pg hstore
and json
columns are mapped as Hash
. [ci skip]
rails guideのA Guide for Upgrading Ruby on Rails
の修正です。
PostgreSQLのhstore
とjson
を使用した場合、Hash
にマッピングされる旨説明を追加しています。
Generate the cookies_serializer configuration with :marshal when upgrading
railties/lib/rails/generators/rails/app/app_generator.rb
の修正です。
rails 4.0-からアップグレードする際に、cookies_serializer
の設定を作成するようのメソッドを追加しています。
なお、デフォルト値は:marshal
になっています。互換性を考慮して、との事です。:hybrid
だと動かないケースがあるもよう。
railties/lib/rails/generators/rails/app/app_generator.rb
の修正。
変数名をfoo
としていたのを修正しています。
Merge pull request #15071 from leafac/issues/11985
ActiveRecord::Relation
の修正です。
特定のメソッドと合わせてdelete_all
を使用した際に、ActiveRecordErrorをraiseするよう修正しています。
対象メソッドは、:limit, :distinct, :offset, :group, :havingです。
Todo.uniq.delete_all # ActiveRecord::ActiveRecordError: delete_all doesn't support distinct
元々は動いていたのですが、処理的に矛盾が無いようにエラーとするよう修正したようです。
Add CHANGELOG entry for #15071 [ci skip]
上記delete_all
の仕様変更について、CHANGELOGに追記しています。
Merge pull request #15037 from roccoblues/fix_duplicate_activesupport_subscribers
activesupport/lib/active_support/subscriber.rb
の修正です。
ActiveSupport::Subscriber
を継承したクラスでメソッドの再定義を行った際に、同じsubscriberを複数登録してしまうバグがあったのを修正しています。
4.1.0から壊れていたもよう。
Replace first person point of view on guides.
複数のrails guiden修正です。
一人称視点になっていた記述を修正した、かと。
Updates reset_counters to allow counter name in params
CounterCache::ClassMethods#reset_counters
メソッドの修正です。
reset_counters
メソッドの第二引数は元々アソシエーション名のみ指定可能だったのを、counter nameも指定出来るよう修正しています。
counter name
というのは、counter cacheに使用するカラム名の事だと思うのですが、試した感じだと上手く動かない…。
Fix typo in CHANGELOG entry for #15071
activerecord/CHANGELOG.md
の修正。
I -> Inに修正。
fixed capitalizations [ci skip]
guides/code/getting_started/Gemfile
の修正です。
sqlite3
-> SQLite3
に修正等、小文字を大文字に修正。
activerecord/lib/active_record/transactions.rb
の修正です。
docのtypoの修正です。
prefer file name instead of filename [ci skip]
rails guideのAPI Documentation Guidelines
のページの修正です。
Filenames
をFile Names
に修正。
Ensure :js is defined regardless of the outcome of the test.
actionpack/test/abstract/collector_test.rb
の修正です。
テストの中でAbstractController::Collector.send(:remove_method, :js)
を行っているのですが、既にメソッドが削除済みの場合、NameError
が起こってしまうので、ensure追加して、メソッドが無い場合にメソッド追加するよう対応しています。
rails guideのGetting Started with Rails
ページの修正です。
.
-> :
に修正しています。