2014/05/07分のコミットです。
昨日リリースされたCVE-2014-0130の対応がmasterにもコミットされました。また、label
メソッドにvalue
を指定した時の挙動が変わっています。
Only accept actions without File::SEPARATOR in the name.
AbstractController::Base#process
メソッドの修正です。
ディレクトリトラバーサルされてしまうセキュリティバグの修正です(CVE-2014-0130)。 昨日3.2.18, 4.0.5, 4.1.1 がリリースされたのは、このセキュリティバグの為ですね。
Ensure that .process return the method return
actionview/test/actionpack/abstract/render_test.rb
の修正です。
.process
メソッドの戻り値のテストを追加しています。
several enhancements to humanize [closes #12288]
humanize
メソッドの修正です。
Before: '_id'.humanize # => "" After: '_id'.humanize # => "Id"
元々は、_id
という文字列は全て空白にする仕様だったのですが、終端の_id
以外は削除しないようにしています。
Include label value in i18n attribute lookup
ActionView::Helpers::Tags::Base::Label::render
メソッドの修正です。
label
メソッドにvalue
を指定した場合に、I18nに指定されたmodel attributeの値を取得するようにしています。
# example # form.html.erb <%= form_for @post do |f| %> <%= f.label :type, value: "long" %> # Long-form Post <% end %> # en.yml en: activerecord: attributes: post/long: "Long-form Post"
割と使えそう。
rails guideのActive Support Core Extensionsの修正です。タイポの修正のみ。
fix guides mobile nav issue [ci skip]
モバイルのページで、矢印がズレてしまっていたのを修正しています。
add a test for the parameters sent to the url helper for new records
actionview/test/activerecord/polymorphic_routes_test.rb
に新規レコードにパラメータを設定した時のテストケースを追加しています。
make sure url_for works similar to polymorphic_url
こちらもactionview/test/activerecord/polymorphic_routes_test.rb
の修正です。
url_for
メソッドのテストを追加しています。
apparently passing a string to polymorphic_url is something we support
こちらもactionview/test/activerecord/polymorphic_routes_test.rb
の修正です。
polymorphic_url
メソッドにString
を渡した場合のテストケースが無かったのを追加しています。
[ci skip] Add feature section and normalize prologue with other guides.
rails guideのActive Record and PostgreSQL
のページを修正です。
ページの先頭にサマリーの追加、リンク漏れの修正等を行っています。
Update links to new rails version in guides [ci skip]
rails guideの_welcome.html.erbの修正です。
昨日リリースされたバージョン(4.1.1/4.0.5/3.2.18)にリンク先を修正しています。
現状、このようなバージョンアップに伴うリンク先の修正が手動になっているようなのですが、今後は自動で行うようにするらしいです。
rename str
to string
to fix overshadowing of variable
railties/test/generators/argv_scrubber_test.rb
の修正です。
変数名をstr
->からstring
に修正しています。
以前違うコミットでも同じような修正があったのですが、基本省略形は使わない方針なんですかねえ。
ActiveRecord::Associations::HasManyAssociation::HasManyThroughAssociation
のdocの修正です。
'we'/'you'の使用を避ける、ピリオド追加、1行を80文字にする、という修正が行われいます。
'we'/'you'の使用を避ける、のは何でなんだろう。
Fix state leaks in actionmailer/test/base_test.rb.
actionmailer/test/base_test.rb
の修正です。
時折テストが壊れる事があったらしく、setup
処理の追加、テストのブロック化、テストの順番入れ替え、等が行われています。
fixed typos in active_record basics [skip ci]
rails guideのActive Record Basics
ページの修正です。typoの修正だけです。