Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add has_named_route? to the mapper API | José Valim | 2013-05-20 | 1 | -0/+5 |
| | |||||
* | Fix named routing regression from 3.2.13 | schneems | 2013-05-16 | 1 | -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. | ||||
* | Rack::Mount was replaced by Journey, Fixed comment | Gaurish Sharma | 2013-04-30 | 1 | -1/+1 |
| | |||||
* | extract arrays to constants in Mapper | Vipul A M | 2013-04-22 | 1 | -2/+4 |
| | |||||
* | Duplicate options before mutating them | Andrew White | 2013-04-18 | 1 | -3/+4 |
| | |||||
* | Mark unused variables and make some style fixes | Agis Anastasopoulos | 2013-04-08 | 2 | -3/+3 |
| | | | | 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 routes | wangjohn | 2013-04-05 | 1 | -12/+13 |
| | | | | mapper) and adding a constant for all the possible scopes. | ||||
* | Merge pull request #9932 from senny/9913_routing_problem | Andrew White | 2013-04-03 | 1 | -8/+12 |
|\ | | | | | routing bugfixes when matching multiple paths | ||||
| * | routing shorthand syntax works with multiple paths | Yves Senn | 2013-03-26 | 1 | -5/+6 |
| | | | | | | | | | | | | Closes #9913. We need to expand the match shorthand syntax for every path. | ||||
| * | bugfix, when matching multiple paths with `get`, `post`, ... | Yves Senn | 2013-03-26 | 1 | -3/+6 |
| | | | | | | | | | | | | This problem was introduced with: https://github.com/rails/rails/commit/d03aa104e069be4e301efa8cefb90a2a785a7bff | ||||
* | | fix regression in Mapper when `format:` was used in a `scope`. | Yves Senn | 2013-04-03 | 1 | -1/+1 |
| | | | | | | | | | | | | | | Closes #10071 `#normalize_path!` depends on the options so we need to call `#normalize_options!` first to make sure everything is set correctly. | ||||
* | | fix wrong argument error message | Vipul A M | 2013-03-31 | 1 | -1/+1 |
|/ | |||||
* | Tweak exception message to avoid giving potentially misleading suggestions | Trevor Turk | 2013-03-20 | 1 | -2/+3 |
| | |||||
* | Raise an ArgumentError when a clashing named route is defined | Trevor Turk | 2013-03-19 | 1 | -1/+8 |
| | |||||
* | Routing match `via` option requirement exception message made more explicit | Boris Staal | 2013-03-05 | 1 | -1/+2 |
| | |||||
* | Use custom visitor class for optimized url helpers | Andrew White | 2013-03-03 | 1 | -9/+1 |
| | | | | | | | | Rather than trying to use gsub to remove the optional route segments, which will fail with nested optional segments, use a custom visitor class that returns a empty string for group nodes. Closes #9524 | ||||
* | Remove redundant method | Andrew White | 2013-02-28 | 1 | -8/+0 |
| | |||||
* | `format: true` does not override existing format constraints. | Yves Senn | 2013-02-27 | 1 | -1/+1 |
| | | | | | | | Closes #9466. Passing `format: true` used to override the constraints: { format: /json/ } with `/.+/`. This patch only sets the format if there is no constraint present. | ||||
* | allow non-String default params in the router. | Yves Senn | 2013-02-26 | 1 | -0/+2 |
| | | | | | | | Closes #9435. Skip valid encoding checks for non-String parameters that come from the matched route's defaults. | ||||
* | the router allows String contraints. | Yves Senn | 2013-02-26 | 1 | -11/+17 |
| | | | | Closes #9432. | ||||
* | Allow both a path and an option on root in config/routes | Sam Ruby | 2013-02-26 | 1 | -2/+9 |
| | |||||
* | determine the match shorthand target early. | Yves Senn | 2013-02-21 | 1 | -14/+12 |
| | | | | | | | | Closes #7554. This patch determines the `controller#action` directly in the `match` method when the shorthand syntax is used. this prevents problems with namespaces and scopes. | ||||
* | Add missing require to routes inspector | Carlos Antonio da Silva | 2013-02-19 | 1 | -0/+1 |
| | |||||
* | Duck typing is hard. Add header to HtmlTableFormatter. | Steve Klabnik | 2013-02-18 | 1 | -0/+4 |
| | | | | | | | Somehow I missed this method, which was then throwing an error when viewing routes as HTML. Make @rubys happy: ✔ | ||||
* | editorial tweaks | Xavier Noria | 2013-02-19 | 1 | -3/+6 |
| | |||||
* | use strip_heredoc to keep indentation consistent. | Steve Klabnik | 2013-02-18 | 1 | -12/+12 |
| | | | | Thanks @sikachu. :heart: | ||||
* | Add message when you have no routes defined. | Steve Klabnik | 2013-02-18 | 1 | -0/+25 |
| | | | | | | Print a message in both `rake routes` and at GET "/rails/info/routes" that lets you know you have no routes defined, as well as linking to the Rails Guide on the topic. | ||||
* | Add headings to rake routes table | Steve Klabnik | 2013-02-18 | 1 | -3/+19 |
| | |||||
* | the `:controller` option for routes can contain numbers. closes #9231. | Yves Senn | 2013-02-09 | 1 | -1/+1 |
| | |||||
* | ruby constant syntax is not supported as routing `:controller` option. | Yves Senn | 2013-02-06 | 1 | -0/+6 |
| | | | | | | | | | | The current implementation only works correctly if you supply the `:controller` with directory notation (eg. `:controller => 'admin/posts'`). The ruby constant notation (eg. `:controller => 'Admin::Posts`) leads to unexpected problems with `url_for`. This patch prints a warning for every non supported `:controller` option. I also added documentation how to work with namespaced controllers. The warning links to that documentation in the rails guide. | ||||
* | Missing or unneeded require extract_options | Akira Matsuda | 2013-02-01 | 3 | -0/+4 |
| | |||||
* | remove dead code | Aaron Patterson | 2013-01-30 | 1 | -4/+1 |
| | |||||
* | change parameter name for positional args | Aaron Patterson | 2013-01-30 | 1 | -2/+1 |
| | |||||
* | nodoc the helper classes, cache stuff for optimized helper | Aaron Patterson | 2013-01-30 | 1 | -13/+17 |
| | |||||
* | cache path parts in the instance | Aaron Patterson | 2013-01-30 | 1 | -2/+3 |
| | |||||
* | stop evaling a string every time | Aaron Patterson | 2013-01-30 | 1 | -4/+4 |
| | |||||
* | moving helper classes outside the private block | Aaron Patterson | 2013-01-30 | 1 | -90/+88 |
| | |||||
* | pushing specialization down to the optimized class | Aaron Patterson | 2013-01-30 | 1 | -23/+25 |
| | |||||
* | use polymorphism to remove conditional | Aaron Patterson | 2013-01-30 | 1 | -35/+27 |
| | |||||
* | move conditionals to instance | Aaron Patterson | 2013-01-30 | 1 | -6/+16 |
| | |||||
* | pull stuff out of the caller and hide in the instance | Aaron Patterson | 2013-01-30 | 1 | -4/+3 |
| | |||||
* | moving more stuff on to the instance | Aaron Patterson | 2013-01-30 | 1 | -18/+18 |
| | |||||
* | move optimize_helper? to the helper instance | Aaron Patterson | 2013-01-30 | 1 | -9/+12 |
| | |||||
* | moving more stuff to the instance | Aaron Patterson | 2013-01-30 | 1 | -6/+6 |
| | |||||
* | moving some stuff to the initializer | Aaron Patterson | 2013-01-30 | 1 | -14/+38 |
| | |||||
* | moved more evald code | Aaron Patterson | 2013-01-30 | 1 | -8/+7 |
| | |||||
* | factored out some of the dynamic code | Aaron Patterson | 2013-01-30 | 1 | -19/+31 |
| | |||||
* | use the helpers list rather than getting the methods from the module | Aaron Patterson | 2013-01-24 | 1 | -1/+1 |
| | |||||
* | module_eval is not necessary here | Aaron Patterson | 2013-01-24 | 1 | -3/+1 |
| | |||||
* | don't need to eval everything | Aaron Patterson | 2013-01-24 | 1 | -1/+1 |
| |