2016/08/22分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Merge pull request #26234 from y-yagi/remove_unnessary_session_store_setting
guides/bug_report_templates/action_controller_master.rb
の修正です。
bug report用のテンプレートファイルからconfig.session_store
の設定を削除しています。
Setup default session store internally, no longer through an applicat… · rails/rails@e5a6f7eの対応により、Rails内部でsession storeのデフォルトにcookie_store
を使用するようになり、cookie_store
を使用する場合は明示的な宣言は不要になった為。
Merge pull request #23759 from maclover7/fix-23757
actioncable/lib/action_cable/channel/base.rb
の修正です。
ActionCable::Channel::Base#processable_action?
でsubscriptionがrejectされないかどうかチェックするよう修正しています。
def processable_action?(action) - self.class.action_methods.include?(action.to_s) + self.class.action_methods.include?(action.to_s) unless subscription_rejected? end
subscriptionがrejectされて場合にactionが実行されるのを避ける為、との事です。
Merge pull request #26241 from scottyantipa/query-interface-docs
rails guideのActive Record Query Interface
の修正です。
Retrieving Objects from the Database
の項にあるfinder methodについて説明している箇所で、説明されているメソッドは全てActiveRecord::Relation
を返す、というような説明になっていたのですが、実際はそうではない(find
やfirst
はActiveRecord::Relation
を返さない)為、説明を修正しています。
Fix ActionDispatch::Http::URL
docs [ci skip]
actionpack/lib/action_dispatch/http/url.rb
のdocの修正です。
ActionDispatch::Http::URL
の各メソッドのdocに、Rack::Request
を継承した独自クラスを使用するexampleが記載されていたのを、ActionDispatch::Request
を使用するよう修正しています。
- # class Request < Rack::Request - # include ActionDispatch::Http::URL - # end - # - # req = Request.new 'HTTP_HOST' => 'example.com' + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' # req.url # => "http://example.com"
ActionDispatch::Request
はRack::Request
を継承しなくなっており、元のexampleではエラーになってしまう為、との事です。
Return 307 status instead of 301 when rerouting POST requests to SSL
actionpack/lib/action_dispatch/middleware/ssl.rb
の修正です。
GET
及びHEAD
以外のrequestをhttpsにリダイレクトする際に、http statusに301を使用していたのを、307を使用するよう修正しています。
def redirection_status(request) if request.get? || request.head? 301 # Issue a permanent redirect via a GET request. else 307 # Issue a fresh request redirect to preserve the HTTP method. end end
301だと元のmethod何であれGET
requestになってしまう為、元のmethodを保持したままリダイレクトするようにする為に、307を使用するようにしたとの事です。
# Before POST http://example.com/articles (i.e. ArticlesContoller#create) redirects to GET https://example.com/articles (i.e. ArticlesContoller#index) # After POST http://example.com/articles (i.e. ArticlesContoller#create) redirects to POST https://example.com/articles (i.e. ArticlesContoller#create)
Change form of table name to plural in query example
rails guideのActive Record Query Interface
の修正です。
Joining Tables
の項のjoins
メソッドのexampleのテーブル名をタイポしていたのを修正しています。