Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8425

Show
Ignore:
Timestamp:
12/17/07 00:06:24 (1 year ago)
Author:
david
Message:

Added OPTIONS to list of default accepted HTTP methods (closes #10449) [holoway]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/CHANGELOG

    r8421 r8425  
    11*2.0.2* (December 16th, 2007) 
     2 
     3* Added OPTIONS to list of default accepted HTTP methods #10449 [holoway] 
    24 
    35* Added option to pass proc to ActionController::Base.asset_host for maximum configurability #10521 [chuyeow]. Example: 
  • trunk/actionpack/lib/action_controller/request.rb

    r8327 r8425  
    55module ActionController 
    66  # HTTP methods which are accepted by default.  
    7   ACCEPTED_HTTP_METHODS = Set.new(%w( get head put post delete )) 
     7  ACCEPTED_HTTP_METHODS = Set.new(%w( get head put post delete options )) 
    88 
    99  # CgiRequest and TestRequest provide concrete implementations. 
  • trunk/actionpack/test/controller/request_test.rb

    r8406 r8425  
    317317  def test_allow_method_hacking_on_post 
    318318    set_request_method_to :post 
    319     [:get, :head, :put, :post, :delete].each do |method| 
     319    [:get, :head, :options, :put, :post, :delete].each do |method| 
    320320      @request.instance_eval { @parameters = { :_method => method } ; @request_method = nil } 
    321321      assert_equal(method == :head ? :get : method, @request.method)