2015/04/13分のコミットです。
CHANGELOGへの追加はありませんでした。
Error message no longer tells you to set the (deprecated) secret_token.
railties/lib/rails/application.rb
の修正です。
secret_key_base
、secret_token
両方設定されてない場合に表示されるメッセージに、secret_token
とsecret_key_base
を設定しろ、となっていたのですが、
secret_token
はdeprecatedになっている為、エラーメッセージからsecret_token
は削除しています。
rails guideのAction View Overview
の修正です。
View Paths
の項にprepend_view_path
、append_view_path
メソッドについての説明を追加しています。
railties/CHANGELOG.md
の修正です。
不要な空行を削除しています。
Merge branch 'mfazekas-action-mailer-async-doc-fixes'
actionmailer/lib/action_mailer/base.rb
のdocの修正です。
ActionMailerによるメール送信についての説明が、同期送信前提の説明になってしまっていたので、非同期送信についての説明を追加しています。
Some copy edits for modifying View Paths [ci skip]
rails guideのAction View Overview
の修正です。
先に追加されたView Paths
の説明について、整理編集(サンプルの追加、グラマーの修正)を行っています。
activesupport/lib/active_support/core_ext/string/filters.rb
の修正です。
String#squish!
メソッドで文字列から不要文字を削除する際、gsub!
を使用していたのをstrip!
を使用するよう修正しています。
- gsub!(/\A[[:space:]]+/, '') - gsub!(/[[:space:]]+\z/, '') gsub!(/[[:space:]]+/, ' ') + strip!
高速化の為との事です。PRにあったbenchmarkは以下の通りです。
Calculating ------------------------------------- squish 45.000 i/100ms new_squish 106.000 i/100ms ------------------------------------------------- squish 445.238 (± 7.4%) i/s - 2.250k new_squish 1.094k (± 5.3%) i/s - 5.512k
Fix (intermittent?) test failure
activerecord/test/cases/schema_dumper_test.rb
の修正です。
column typeについてのテストで、指定可能な型をテスト内で全て定義していたのをを、正規表現でマッチするよう修正しています。
- if match = column.match(/t\.(?:integer|decimal|float|datetime|timestamp|time|date|text|binary|string|boolean|xml|uuid|point)\s+"/) + if match = column.match(/\bt\.\w+\s+"/)
テストコードで全部ベタに持つ必要は無いだろう、という事で修正したようです。
Merge pull request #19564 from jonatack/counter_cache_docs
rails guideのActive Record Associations
の修正です。
counter_cache
について説明している箇所を修正しています。修正内容は以下のとおり。
has_many
側にもcounter_cache
の設定をしていたのを削除counter_cache
に任意のカラム名を指定する場合についての説明を、 別段落に切り出し- NOTE部分で
counter_cache
はhas_many
側に設定する旨説明していたのを、belongs_to
側に設定する必要がある旨説明を修正
Enhance documentation of pluck with a hint to ids [ci skip]
activerecord/lib/active_record/relation/calculations.rb
の修正です。
pluck
メソッドのサンプルにid
カラムを使用していたのを、name
カラムを取得するよう修正しています。id
が取得したい場合は、ids
メソッドを使用すれば良いので、id
以外のカラムを取得するよう修正したようです。
Apply comments from @rafaelfranca: we shouldn't recommend you use scaffold css
rails guideのGetting Started with Engines
の修正です。
rails engine内のapplication.html.erb
でscaffold.css
を使用する場合の例が記載されていたのですが、engineはデフォルトではscaffold.css
を読み込まないし、engineでscaffold.css
を使用するのはオススメしない、という事で削除したようです。
Apply edits from @senny to close #19397 [ci skip]
activerecord/lib/active_record/associations.rb
のdocの修正です。
中間テーブル作成する為のexampleで、create_join_table
メソッドを使用するよう修正しています。
Revert "Merge pull request #19682 from supercaracal/fix_force_ssl_redirection_flash_error"
Fix fails to force_ssl_redirection if session_store is disabledのコミットをrevertしています。
対応内容がおかしいと思われる、かつ、rails-api のテストが壊れてしまった為、revertしたとの事です。
Add note wrt foreign key constraint to ensure data integrity
rails guideのActive Record Associations
の修正です。
ユニークインデックスと外部キー制約を同時に設定する場合のサンプルを追加しています。
Add a note regarding add_column restricted API [ci skip]
activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
のdocの修正です。
add_column
メソッドのdocにTableDefinition#column
で定義されている全てのオプションが使える訳ではない旨noteを追記しています。
update request_forgery_protection docs [ci skip]
actionpack/lib/action_controller/metal/request_forgery_protection.rb
のdocの修正です。
Request Forgery protectionの説明を現在の実装内容に合わせて更新しています。
Apply comments from @jeremy regarding why HTML and Javascript requests
actionpack/lib/action_controller/metal/request_forgery_protection.rb
のdocの修正です。
web browserからのリクエストに対して何故CSRF protectionを行わなければならないのか、説明を追加しています。
Add note regarding CSRF for APIs, as a use-case for skipping it [ci skip]
actionpack/lib/action_controller/metal/request_forgery_protection.rb
の修正です。
何故APIからのリクエストの場合は、CSRF protectionを無効にすべてきなのか、説明を追加しています。
Document that partial indexes are only supported by Postgres and SQLite.
activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
のdocの修正です。
Partial indexes はPostgreSQLとSQLite 3.8.0+でのみサポートしている旨noteを追加しています。
Fix the wrong documentation about config.autoload_paths [ci skip]
rails guideのAutoloading and Reloading Constants
の修正です。
config.autoload_paths
は環境ごとの設定ファイルからでは更新出来ない旨説明を追加しています。 config.autoload_paths
はfrozenされてしまっているので、更新出来ないん
ですねえ。
Improve note about unique index and foreign key on has_one association
rails guideのActive Record Associations
の修正です。
ユニークインデックスと外部キー制約を同時に設定する場合のexampleについて、説明の修正及びexampleから不要なスペースの削除を行っています。