なるようになるブログ

読書感想文かrailsについてかrubyについてか

rails commit log流し読み(2015/04/28)

2015/04/28分のコミットです。

CHANGELOGにのったコミットは以下の通りです。

activerecord/CHANGELOG.md

actionmailer/CHANGELOG.md


Small punctuation fixes [ci skip]

rails guideのAction View Overviewの修正です。

クラス名、メソッド名をバッククォートでエスケープするよう修正しています。


Updated request_forgery_protection docs [ci skip]

actionpack/lib/action_controller/metal/request_forgery_protection.rbのdocの修正です。

Javascript -> JavaScriptoauth -> OAuthに表記ゆれを修正、1行80文字に収まるよう適切な位置に改行を追加、等を行っています。


AUTH PLAIN is Base64 encoded [ci skip]

actionmailer/lib/action_mailer/base.rbのdocの修正です。

smtp_settingsauthenticationオプションに:plainを指定した場合、パスワードが送られる、となっていたのですが、実際はBase64 encodeされたデータが送信されるので、その旨docを修正しています。


Merge pull request #19718 from eagletmt/find_by-without-arg

activerecord/lib/active_record/relation/finder_methods.rbの修正です。

find_byfind_by!メソッドに引数を指定しなかった場合に、ArgumentErrorがraiseされるよう修正しています。


Merge pull request #19546 from DianthuDia/fix_unscope_for_less_than

activerecord/lib/active_record/relation/where_clause.rbの修正です。

less thangreater thanについてもunscope出来るよう修正しています。

# before
User.where(id: -Float::INFINITY...2).unscope(where: :id)
# => SELECT "users".* FROM "users" WHERE ("users"."id" < 2)

# after
User.where(id: -Float::INFINITY...2).unscope(where: :id)
# => SELECT "users".* FROM "users"

where-Float::INFINITYを指定する書き方始めて知りました。


Unlock sneakers adapter version

Gemfileの修正です。

sneakersのバージョンを'0.1.1.pre'で固定していたのから、バージョンの固定を削除しています。


guides, bring back minitest assertion table. [ci skip]

rails guideのA Guide to Testing Rails Applicationsの修正です。

testing guideにminitest assertionの一覧を記載したテーブルを再度記載するよう修正しています。

minitestのdocを見れば良いのでは、という事で一度削除したのですが、Railsは否定形の為のメソッドとして独自に_notメソッドがあり、その説明の為に再度記載するようにしたようです。


Clarify test_order default configuration behaviour [ci skip]

rails guideのConfiguring Rails Applicationsの修正です。

Rails 5からconfig.active_support.test_orderのデフォルト値が:randomに変わったので、その旨説明を修正しています。


fixed typo

activerecord/lib/active_record/nested_attributes.rbのdocの修正です。

attributed -> attributesにタイポを修正しています。


Added note about non-GET links getting converted to GET links in mailer templates [ci skip]

rails guideのAction Mailer Basicsの修正です。

generating URLs with named routesの項に、 mailer templatesではGET以外のリンクについては正常に表示されない旨注記を追加しています。

GET以外のリンクを作成するには、jquery-ujsが必要なのですが、mailer templatesではデフォルトでは読み込んで無いから、との事です。


Update instructions to build guides locally [ci skip]

guides/source/api_documentation_guidelines.mdguides/source/ruby_on_rails_guides_guidelines.mdのdocの修正です。

長い行の適切な位置に改行を追加、RDocの生成先ディレクトリの説明を追加、等を行っています。


mailer previews, make sure labels and values line up.

railties/lib/rails/templates/rails/mailers/email.html.erbの修正です。

mailer previewsFromtoに表示する値が無い場合に、表示がずれてしまうバグがあったのを修正しています。

before

c3c73c9e-ecc6-11e4-9c08-c664a2c14b7f.png (389×81)

after

c793bef6-ecc6-11e4-8433-c87541eeb4b2.png (344×80)


mailer previews for NullMail instances. Closes #19849.

ActionMailerの修正です。

mailer previewsNullMailインスタンスを渡した際にエラーになってしまっていたのを修正しています。