Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | add tests and external file backtrace for Routing::Mapper#draw | Kornelius Kalnbach | 2012-05-15 | 1 | -0/+49 |
| | |||||
* | Copy literal route constraints to defaults - fixes #3571 and #6224. | Andrew White | 2012-05-11 | 1 | -0/+42 |
| | |||||
* | Don't ignore nil positional arguments for url helpers - fixes #6196. | Andrew White | 2012-05-10 | 1 | -0/+35 |
| | |||||
* | Refactor Generator class to not rely on in-place editing the controller | Andrew White | 2012-05-09 | 1 | -6/+6 |
| | |||||
* | Fix bug when url_for changes controller. | Nikita Beloglazov | 2012-05-09 | 1 | -0/+9 |
| | |||||
* | Fix that optimized named routes should also work as singleton methods on the ↵ | Jeremy Kemper | 2012-05-06 | 1 | -0/+24 |
| | | | | url_helpers module | ||||
* | Force given path to http methods in mapper to skip canonical action checking | Carlos Antonio da Silva | 2012-05-04 | 1 | -1/+8 |
| | | | | | | | | | | | | | | | This fixes the following scenario: resources :contacts do post 'new', action: 'new', on: :collection, as: :new end Where the /new path is not generated because it's considered a canonical action, part of the normal resource actions: new_contacts POST /contacts(.:format) contacts#new Fixes #2999 | ||||
* | Reset the request parameters after a constraints check | Andrew White | 2012-05-02 | 1 | -0/+19 |
| | | | | | | | | | | | | | A callable object passed as a constraint for a route may access the request parameters as part of its check. This causes the combined parameters hash to be cached in the environment hash. If the constraint fails then any subsequent access of the request parameters will be against that stale hash. To fix this we delete the cache after every call to `matches?`. This may have a negative performance impact if the contraint wraps a large number of routes as the parameters hash is built by merging GET, POST and path parameters. Fixes #2510. | ||||
* | Restore interpolation of path option in redirect routes | Andrew White | 2012-04-29 | 1 | -1/+32 |
| | |||||
* | Escape interpolated params when redirecting - fixes #5688 | Andrew White | 2012-04-29 | 1 | -0/+29 |
| | |||||
* | Remove default match without specified method | Jose and Yehuda | 2012-04-24 | 1 | -53/+53 |
| | | | | | | | | | | | | | | | | In the current router DSL, using the +match+ DSL method will match all verbs for the path to the specified endpoint. In the vast majority of cases, people are currently using +match+ when they actually mean +get+. This introduces security implications. This commit disallows calling +match+ without an HTTP verb constraint by default. To explicitly match all verbs, this commit also adds a :via => :all option to +match+. Closes #5964 | ||||
* | Allow a defining custom member field on resources | Jamie Macey | 2012-03-25 | 1 | -0/+18 |
| | | | | | | | | | | By default, resources routes are created with :resource/:id. A model defining to_param can make prettier urls by using something more readable than an integer ID, but since the route picks it up as :id you wind up with awkward User.find_by_username(params[:id]) calls. By overriding the key to be used in @request.params you can be more obvious in your intent. | ||||
* | Remove wrong and redundant code. | kennyj | 2012-02-25 | 1 | -6/+4 |
| | |||||
* | uses PATCH for the forms of persisted records, and routes PATCH and PUT to ↵ | Xavier Noria | 2012-02-24 | 1 | -0/+8 |
| | | | | the update action of resources | ||||
* | Testcase for GH #5114. | kennyj | 2012-02-22 | 1 | -0/+26 |
| | |||||
* | fixing AP tests | Aaron Patterson | 2012-02-15 | 1 | -1/+1 |
| | |||||
* | say goodbye to #with_test_routes :axe: | Xavier Noria | 2012-02-10 | 1 | -1166/+947 |
| | |||||
* | fixes a regression introduced by 532cd4, and a bogus test in AP the ↵ | Xavier Noria | 2012-02-10 | 1 | -6/+6 |
| | | | | regression uncovered | ||||
* | Fix GH #4720. Routing problem with nested namespace and already camelized ↵ | kennyj | 2012-02-10 | 1 | -0/+26 |
| | | | | controller option. | ||||
* | Fix url_for method's behavior when it is called with :controller option ↵ | kennyj | 2012-02-07 | 1 | -0/+33 |
| | | | | | | which starts with "/" from multiple nested controller. Closes #3864 | ||||
* | Revert "Deprecated multi args to http route methods" | Jeremy Kemper | 2012-02-05 | 1 | -2/+1 |
| | | | | | | | | | | Too painful to lose the compact shorthand form! This reverts commit e848c52535fa0f9488cdbdb3f1cedc7c7c02d643. Conflicts: actionpack/lib/action_dispatch/routing/mapper.rb | ||||
* | Remove not used env[] call in routing_test. | Carlos Antonio da Silva | 2012-01-27 | 1 | -1/+0 |
| | | | The commit 4c321c6d42b6e35f9ead12eb1dccdead03c5abf4 removes the path_params variable assignment, actually the entire line is not used at all. | ||||
* | Fix warning. assigned but unused variable - path_params | kennyj | 2012-01-28 | 1 | -1/+1 |
| | |||||
* | Merge pull request #4658 from pwim/unicode-paths | Aaron Patterson | 2012-01-25 | 1 | -0/+20 |
| | | | | Test for unicode path support | ||||
* | Deprecated multi args to http route methods | Aaron Patterson | 2012-01-23 | 1 | -1/+2 |
| | |||||
* | Stub ip method of alternative request class | Sam Pohlenz | 2012-01-14 | 1 | -0/+4 |
| | |||||
* | Fix routing test to use assert_equal | Carlos Antonio da Silva | 2012-01-06 | 1 | -2/+2 |
| | |||||
* | just use def setup | Aaron Patterson | 2011-12-21 | 1 | -1/+2 |
| | |||||
* | Do not raise an exception if an invalid route was generated automatically. | José Valim | 2011-12-16 | 1 | -0/+1 |
| | |||||
* | Fix failing AP tests. | José Valim | 2011-12-13 | 1 | -1/+1 |
| | |||||
* | Refactoring the redirect method for the router api. | Aaron Patterson | 2011-11-18 | 1 | -0/+5 |
| | |||||
* | remove the :path feature to redirects, since it cannot work | Aaron Patterson | 2011-11-18 | 1 | -33/+0 |
| | |||||
* | require that all blocks have arity of 2 | Aaron Patterson | 2011-11-18 | 1 | -1/+1 |
| | |||||
* | Symbol captures may generate multiple path segments, so don't escape / -> ↵ | Jeremy Kemper | 2011-10-13 | 1 | -7/+17 |
| | | | | %2F. Test splat escaping. | ||||
* | Failing tests for path parameter escaping | Jeremy Kemper | 2011-10-13 | 1 | -0/+27 |
| | |||||
* | allow shorthand routes with nested optional parameters | Diego Carrion | 2011-10-10 | 1 | -0/+11 |
| | |||||
* | Fix named routes modifying arguments | Pawel Pierzchala | 2011-09-22 | 1 | -0/+11 |
| | |||||
* | when calling url_for with a hash, additional (likely unwanted) values (such ↵ | Andrew Kaspick | 2011-08-11 | 1 | -0/+12 |
| | | | | as :host) would be returned in the hash... calling #dup on the hash prevents this | ||||
* | Ensure the constraints block is only applied to the correct route | Dave Rogers | 2011-07-25 | 1 | -0/+20 |
| | | | | | addresses issue #1907 - any routes that follow a route with a constraints block are inheriting the previous route's constraints. | ||||
* | Remove `#among?` from Active Support | Prem Sichanugrist | 2011-04-13 | 1 | -1/+1 |
| | | | | | | After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now. It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`. | ||||
* | Change Object#either? to Object#among? -- thanks to @jamesarosen for the ↵ | David Heinemeier Hansson | 2011-04-12 | 1 | -1/+1 |
| | | | | suggestion! | ||||
* | Fix failing test case on master | Prem Sichanugrist | 2011-04-10 | 1 | -1/+1 |
| | | | | It turned out that I overlook at some replacements .. | ||||
* | Using Object#in? and Object#either? in various places | Prem Sichanugrist | 2011-04-11 | 1 | -1/+2 |
| | | | | There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?. | ||||
* | Raise ArgumentError if route name is invalid [#6517 state:resolved] | Andrew White | 2011-03-06 | 1 | -0/+32 |
| | |||||
* | Add test to prevent regression on namespace root nested in a resource | Andrew White | 2011-02-14 | 1 | -0/+9 |
| | | | | [#6389 state:resolved] | ||||
* | Fix named route helper for routes nested inside deeply nested resources | Andrew White | 2011-02-14 | 1 | -1/+9 |
| | | | | [#6416 state:resolved] | ||||
* | fixed bug with nested resources within shallow scope | german | 2011-02-04 | 1 | -0/+62 |
| | | | | | | [#6372 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | Added documentation explaining the new additional supported syntaxes for the ↵ | Josh Kalderimis | 2010-11-30 | 1 | -0/+17 |
| | | | | routing redirect method, a small changelog note, and two extra tests for path interpolation when using the hash option syntax. | ||||
* | The redirect routing method now allows for a hash of options which only ↵ | Josh Kalderimis | 2010-11-30 | 1 | -0/+48 |
| | | | | changes the relevant parts of the url, or an object which responds to call can be supplied so common redirect rules can be easily reused. This commit includes a change where url generation from parts has been moved to AD::Http::URL as a class method. | ||||
* | Dynamically generaeted helpers on collection should not clobber resources ↵ | José Valim | 2010-11-25 | 1 | -0/+11 |
| | | | | url helper [#6028 state:resolved] |