2014/08/17分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
[ci skip] re-worded section on CookieStore to make it more readable.
rails guideのRuby on Rails Security Guideの修正です。
CookieStoreについて、説明を修正しています。
Merge pull request #16517 from sgrif/sg-comparable-attributes
activerecord/lib/active_record/attribute.rb、
activerecord/lib/active_record/type/value.rbの修正です。
Type::ValueとAttributeに==メソッドを追加しています。
Implement _was and changes for in-place mutations of AR attributes
ActiveRecordの修正です。
_was及びchangesメソッドについて、正常に動作してなかったのを、正常に動作するよう対応しています。
また、attribute_was=、clear_attribute_changesというメソッドが追加されているのですが、こちらについては次のコミットで削除されているので割愛。
Don't expose these new APIs yet (added in 877ea78 / #16189)
activemodel/lib/active_model/dirty.rbの修正です。
先程追加された新規APIについて削除しています。
今後まだ変更の可能性があるためのようです。
[ci skip] Fix sample code in Layouts and Rendering guide
rails guideのLayouts and Rendering in Railsの修正です。
video_tagのサンプルで、出力結果が誤っていたのを修正しています。
When your templates change, browser caches bust automatically.
ActionPackの修正です。
fresh_whenメソッドを使用している時、テンプレートが更新された場合も、ETagが更新されるようになりました。
fresh_when @post
上記のような形でfresh_whenメソッドを使用した場合、元々は@postのデータが更新されないとETagの更新がされなかったんですが、posts/show.html.erbが更新された場合もETagが更新されるようになりました。テンプレートのETagにテンプレートのdigestも含まれるようになった為。
任意のテンプレートを使用したい場合は、:templateオプションで指定出来ます。
fresh_when @post, template: 'widgets/show'
テンプレートの更新を含みたく無い場合は、template: false、全体で設定したい場合は、config.action_controller.etag_with_template_digest = falseを指定する事で対応出来ます。
テンプレートの更新が含まれるようになったので、大分fresh_whenメソッドが使いやすくなりましたねえ。シンプルなページであれば、とりあえず設定しておく、で良いかも。
Merge pull request #16338 from robin850/rbx-safe-constantize
activesupport/lib/active_support/inflector/methods.rbの修正です。
存在しないnamespaceを含む定数にアクセスした際に、エラー情報が正しく取得出来てなかったのを対応しています。
# before begin Namespace::Foo rescue NameError => e e.name # => nil end # after begin Namespace::Foo rescue NameError => e e.name # => :Namespace end