2014/12/24分のコミットです。
CHANGELOGへの追加はありませんでした。
Refactor a common class to reduce the duplication for references
activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
、
activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
の修正です。
TableDefinition#references
メソッドとSchemaStatements#add_reference
メソッドは殆ど似たような処理になってしまっていたので、
メソッドから共通した処理を切り出して新規クラス(ReferenceDefinition
)を作成し、共通部分についてはそのクラスを使用するよう修正しています。
Rails::Application#secrets should be documented.
railties/lib/rails/application.rb
のdocの修正です。
Application#secrets
メソッドのrdocを追加しています。
Don't treat nil
as changed in serialized types
activerecord/lib/active_record/type/serialized.rb
の修正です。
serialize
を使用しているカラムにnilを設定した場合に、changed
の判定処理に誤りがあったのを修正しています。
issueより。
class Post < ActiveRecord::Base serialize :categories, Array end post = Post.create!(categories: nil) post.categories # => [] in 4.2.0 and 4.1.8 post.categories_changed? # => true in 4.2.0, false in 4.1.8 # reloading the object in the future will have the same results post2 = Post.find(post.id) post2.categories # => [] in 4.2.0 and 4.1.8 post2.categories_changed? # => true in 4.2.0, false in 4.1.8
Remove unneeded special case to calculate size for has_many :through
activerecord/lib/active_record/associations/has_many_through_association.rb
の修正です。
size
メソッドを削除しています。
元々はhas_many :through
の場合のみ特殊で、独自にメソッドを定義していたようなすが、
現在は親クラスであるCollectionAssociation#size
で処理が行われる為、不要である為削除したようです。
proof of concept, need to check in GitHub
guides/rails_guides/markdown/renderer.rb
、guides/source/2_2_release_notes.md
の修正です。
guideの中に'GITHUB-WARNING'
という文字列があった場合、その文字列を除去するテスト(コミットログがproof of conceptとなっている) を行っているようです。
second test to warn against reading guides in GitHub
guides/rails_guides/markdown/renderer.rb
、guides/source/2_2_release_notes.md
の修正です。
上記テストの続きのようです。
third test to warn against reading guides in GitHub
guides/rails_guides/markdown/renderer.rb
、guides/source/2_2_release_notes.md
の修正です。
まだ上記テストの続きのようです。 文字列が"DO NOT READ THIS FILE IN GITHUB"
に変わっています。
warn about reading guides in GitHub
各guideの修正です。
先頭に、**DO NOT READ THIS FILE IN GITHUB, GUIDES ARE PUBLISHED IN http://guides.rubyonrails.org.**
という注意書きを追加しています。
Guideはhttp://guides.rubyonrails.org/で見るように構成されており、Github上で見るとリンクが適切に設定されないのですが、 どうもそのリンクが設定されないのをバグと勘違いし、修正のPRが送られてくるケースがあったようなので、 注意書きを追加したようです。
removes superfluous regexp group
guides/rails_guides/markdown/renderer.rb
の修正です。
rails guide生成処理のparagraph
メソッドにあった不要な正規表現のグルーピング処理を削除しています。
- Removed unused parameter to cookie serialize method and fixed usage of the same elsewhere
actionpack/lib/action_dispatch/middleware/cookies.rb
の修正です。
SerializedCookieJars#serialize
メソッドから使用していないname
引数を削除しています。
Merge pull request #18107 from mkdynamic/add-reply-to-mail-to
actionview/lib/action_view/helpers/url_helper.rb
の修正です。
mail_to
メソッドのオプションにreply_to
を指定出来るよう対応しています。
helper.mail_to("me@example.com", "My email", cc: "ccaddress@example.com", bcc: "bccaddress@example.com", subject: "This is an example email", body: "This is the body of the message.", reply_to: "foo@bar.com") # => "<a href=\"mailto:me@example.com?cc=ccaddress%40example.com&bcc=bccaddress%40example.com&body=This%20is%20the%20body%20of%20the%20message.&subject=This%20is%20an%20example%20email&reply-to=foo%40bar.com\">My email</a>"