aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Fix shorthand routes where controller and action are in the scopeAndrew White2013-06-251-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge `:action` from routing scope and assign endpoint if both `:controller` and `:action` are present. The endpoint assignment only occurs if there is no `:to` present in the options hash so should only affect routes using the shorthand syntax (i.e. endpoint is inferred from the the path). Fixes #9856
* | | | Merge pull request #11069 from ykzts/actiondispatch-ssl-secure-flag-igonore-caseGuillermo Iguaran2013-06-241-1/+1
|\ \ \ \ | | | | | | | | | | Flag cookies as secure with ignore case in ActionDispatch::SSL
| * | | | Flag cookies as secure with ignore case in ActionDispatch::SSLYamagishi Kazutoshi2013-06-241-1/+1
| | | | |
* | | | | ActionDispatch:SSL: don't include STS header in non-https responsesGeoff Buesing2013-06-231-2/+1
|/ / / /
* / / / Don't remove trailing slash from PATH_INFO for mounted appsPiotr Sarnacki2013-06-211-1/+7
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously when app was mounted as following: class Foo def call(env) [200, {}, [env['PATH_INFO']]] end end RackMountRailsBug::Application.routes.draw do mount RackTest.new => "/foo" end trailing slash was removed from PATH_INFO. For example requesting GET /foo/bar/ on routes defined above would result in a response containing "/foo/bar" instead of "/foo/bar/". This commit fixes the issue. (closes #3215)
* | | Don't set X-UA-Compatible header by defaultGuillermo Iguaran2013-06-131-2/+1
| | | | | | | | | | | | | | | | | | We are setting this header to chrome=1 for Chrome Frame and this will be retired soon. Check http://blog.chromium.org/2013/06/retiring-chrome-frame.html for details
* | | Grammar nazi at work [ci skip]Paweł Gościcki2013-06-121-1/+1
|/ /
* | Merge pull request #10839 from gsamokovarov/clean-normalize_encoded_pathsRafael Mendonça França2013-06-041-11/+7
|\ \ | | | | | | Refactor ActionDispatch::Http::Parameters#normalize_encode_params
| * | Refactor ActionDispatch::Http::Parameters#normalize_encode_paramsGenadi Samokovarov2013-06-041-11/+7
| | |
* | | Merge pull request #10838 from gsamokovarov/routing-autoload_underRafael Mendonça França2013-06-041-5/+7
|\ \ \ | | | | | | | | DRY-up ActionDispatch::Routing autoloads
| * | | Dry-up ActionDispatch::Routing autoloadsGenadi Samokovarov2013-06-041-5/+7
| |/ /
* | | Remove Mime::Type#verify_request? and Mime::Type.browser_generated_types ↵kennyj2013-06-021-16/+0
| | | | | | | | | | | | were deprecated.
* | | Add propery docs to ActionDispatch::Response [ci skip]Steve Klabnik2013-05-301-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After some discussion on Twitter with @skud, the documentation on ActionDispatch::Response is a bit sparse. This class is useful when you're writing tests, as often you want to assert various things about the response that's coming back. Better docs would make this easier for people new to testing in Rails. I only added some descriptions for various properties that were defined, and mostly just a sentence or two. Most of these things are familliar if you're working with HTTP, but some words is better than no words at all. Hopefully further commits will fix up things that aren't just documentation.
* | | Merge pull request #10803 from gsamokovarov/extract-deep-mungeRafael Mendonça França2013-05-303-18/+27
|\ \ \ | | | | | | | | Extract ActionDispatch::Request#deep_munge
| * | | Extract ActionDispatch::Request#deep_mungeGenadi Samokovarov2013-05-303-18/+27
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | ActionDispatch::Request#deep_munge was introduced as a private method, but was turned into a public one for the use of ActionDispatch::ParamsParser. I have extracted it into ActionDispatch::Request::Utils, so it does not get mixed up with the Request public methods.
* / / `RoutesInspector` deals with routes using regexp as `:controller` optionYves Senn2013-05-301-1/+1
|/ /
* | Require only minitest.Rafael Mendonça França2013-05-221-1/+1
| | | | | | | | | | minitest/autorun required minitest/spec and we are avoiding to require it.
* | Merge pull request #10667 from rubys/minitest-autorunRafael Mendonça França2013-05-221-1/+1
|\ \ | | | | | | Eliminate minitest warnings
| * | Eliminate minitest warningsSam Ruby2013-05-171-1/+1
| | | | | | | | | | | | https://github.com/seattlerb/minitest/commit/9a57c520ceac76abfe6105866f8548a94eb357b6#L15R8
* | | Add has_named_route? to the mapper APIJosé Valim2013-05-201-0/+5
|/ /
* | Fix named routing regression from 3.2.13schneems2013-05-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When named route that is nested is used in 3.2.13 Example `routes.rb`: ``` resources :nested do resources :builder, :controller => 'nested/builder' end ``` In 3.2.12 and 3.2.12 this named route would work: ``` nested_builder_path(:last_step, :nested_id => "foo") ``` Generating a url that looks like `/nested/foo/builder/last_step`. This PR fixes the regression when building urls via the optimized helper. Any explicit keys set in the options are removed from the list of implicitly mapped keys. Not sure if this is exactly how the original version worked, but this fixes this use case regression.
* | Revert "Integration tests support the OPTIONS http method"Rafael Mendonça França2013-05-161-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ad46884af567d6f8d6d8d777f372c39e81a560ba. Conflicts: actionpack/CHANGELOG.md actionpack/lib/action_dispatch/testing/integration.rb actionpack/test/controller/integration_test.rb Reason: It will conflict with a lot of test cases. Better to call `process` directly since this is a very uncommon HTTP method. Fixes #10638.
* | Fixing build broken by this changeArun Agrawal2013-05-131-2/+2
| | | | | | | | c43ca06ca091fc09e2c86bb051ac92b648f12b64
* | Code cleanup for ActionDispatch::Flash#callJulian Vargas2013-05-121-9/+3
| | | | | | | | | | | | | | The nested `if` was replaced by using `presence` which takes account for the given hash when it is `nil` or when it is empty. The `else` was removed because what it was doing was to assign to `env[KEY]` the value it already had.
* | Merge pull request #10536 from vipulnsward/fix_exp_warningCarlos Antonio da Silva2013-05-091-1/+0
|\ \ | | | | | | remove variable and fix warning
| * | remove variable and fix warningVipul A M2013-05-091-1/+0
| | |
* | | rails -> Rails [ci skip]Prathamesh Sonpatki2013-05-091-1/+1
|/ /
* | Fix that JSON and XML exception responses should give the HTTP error message ↵Jeremy Kemper2013-05-081-2/+2
| | | | | | | | for their status, by default, not the message from the underlying exception
* | Merge pull request #10426 from tkrajcar/rescue-h1-fixCarlos Antonio da Silva2013-05-021-0/+6
|\ \ | | | | | | Add styling to h1 for default rescue layout
| * | Add styling to h1Tim Krajcar2013-05-021-0/+6
| | |
* | | use constant for encodingNihad Abbasov2013-05-021-1/+1
|/ /
* | Merge pull request #9857 from yyyc514/bad_params_should_400Aaron Patterson2013-04-301-0/+1
|\ \ | | | | | | failure to parse params should trigger a 400 Bad Request
| * | failure to parse params should trigger a 400 Bad RequestJosh Goebel2013-03-211-0/+1
| | |
* | | add missing semicolon to journey parser.yBen Holley2013-04-301-0/+1
| | |
* | | Rack::Mount was replaced by Journey, Fixed commentGaurish Sharma2013-04-301-1/+1
| | |
* | | Merge pull request #10301 from vipulnsward/extract_in_mapperAndrew White2013-04-221-2/+4
|\ \ \ | | | | | | | | extract arrays to constants in Mapper
| * | | extract arrays to constants in MapperVipul A M2013-04-221-2/+4
| | | |
* | | | Merge pull request #10299 from econsultancy/use-method-not-allowed-exceptionAndrew White2013-04-221-0/+1
|\ \ \ \ | |/ / / |/| | | Use MethodNotAllowed exception rather than UnknownHttpMethod
| * | | Return a 405 response for unknown HTTP methodsLewis Marshall2013-04-221-0/+1
| | | |
* | | | extract no content response codes to a constantVipul A M2013-04-221-1/+2
|/ / /
* | | Refactor ActionDispatch::Http::URL.build_host_urlAndrew White2013-04-181-20/+49
| | | | | | | | | | | | | | | Add support for extracting the port from the :host option and for removing the subdomain by using nil, false or ''.
* | | Duplicate options before mutating themAndrew White2013-04-182-3/+5
| | |
* | | Passing subdomain: '' to url_for removes the subdomain (instead of adding a ↵Derek Watson2013-04-182-1/+5
| | | | | | | | | | | | | | | | | | leading .) Adding a boolean route constraint checks for presence/absence of request property
* | | make [] method in router more readablebuddhamagnet2013-04-151-1/+3
| | |
* | | Return nil for Mime::NullType#refAndrew White2013-04-101-0/+4
| | |
* | | Reverts rendering behavior when format is unknownGrzegorz Świrski2013-04-101-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | If a request has unknown format (eg. /foo.bar), the renderer fallbacks to default format. This patch reverts Rails 3.2 behavior after c2267db commit. Fixes issue #9654.
* | | Use camelize instead of capitalize on error screenNikolay Shebanov2013-04-101-1/+1
| | |
* | | change array of array to hashVipul A M2013-04-091-6/+4
| | |
* | | Mark unused variables and make some style fixesAgis Anastasopoulos2013-04-089-13/+13
| | | | | | | | | | | | It'd be a nice convention to mark the unused variables like this, now that Ruby 2 will issue no warnings for such vars being unused.
* | | Refactoring some reused code into a method (inside of the routeswangjohn2013-04-051-12/+13
| | | | | | | | | | | | mapper) and adding a constant for all the possible scopes.