aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing
Commit message (Collapse)AuthorAgeFilesLines
* `RoutesInspector` deals with routes using regexp as `:controller` optionYves Senn2013-05-301-1/+1
|
* 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.
* Rack::Mount was replaced by Journey, Fixed commentGaurish Sharma2013-04-301-1/+1
|
* extract arrays to constants in MapperVipul A M2013-04-221-2/+4
|
* Duplicate options before mutating themAndrew White2013-04-181-3/+4
|
* Mark unused variables and make some style fixesAgis Anastasopoulos2013-04-082-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 routeswangjohn2013-04-051-12/+13
| | | | mapper) and adding a constant for all the possible scopes.
* Merge pull request #9932 from senny/9913_routing_problemAndrew White2013-04-031-8/+12
|\ | | | | routing bugfixes when matching multiple paths
| * routing shorthand syntax works with multiple pathsYves Senn2013-03-261-5/+6
| | | | | | | | | | | | Closes #9913. We need to expand the match shorthand syntax for every path.
| * bugfix, when matching multiple paths with `get`, `post`, ...Yves Senn2013-03-261-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 Senn2013-04-031-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 messageVipul A M2013-03-311-1/+1
|/
* Tweak exception message to avoid giving potentially misleading suggestionsTrevor Turk2013-03-201-2/+3
|
* Raise an ArgumentError when a clashing named route is definedTrevor Turk2013-03-191-1/+8
|
* Routing match `via` option requirement exception message made more explicitBoris Staal2013-03-051-1/+2
|
* Use custom visitor class for optimized url helpersAndrew White2013-03-031-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 methodAndrew White2013-02-281-8/+0
|
* `format: true` does not override existing format constraints.Yves Senn2013-02-271-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 Senn2013-02-261-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 Senn2013-02-261-11/+17
| | | | Closes #9432.
* Allow both a path and an option on root in config/routesSam Ruby2013-02-261-2/+9
|
* determine the match shorthand target early.Yves Senn2013-02-211-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 inspectorCarlos Antonio da Silva2013-02-191-0/+1
|
* Duck typing is hard. Add header to HtmlTableFormatter.Steve Klabnik2013-02-181-0/+4
| | | | | | | Somehow I missed this method, which was then throwing an error when viewing routes as HTML. Make @rubys happy: ✔
* editorial tweaksXavier Noria2013-02-191-3/+6
|
* use strip_heredoc to keep indentation consistent.Steve Klabnik2013-02-181-12/+12
| | | | Thanks @sikachu. :heart:
* Add message when you have no routes defined.Steve Klabnik2013-02-181-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 tableSteve Klabnik2013-02-181-3/+19
|
* the `:controller` option for routes can contain numbers. closes #9231.Yves Senn2013-02-091-1/+1
|
* ruby constant syntax is not supported as routing `:controller` option.Yves Senn2013-02-061-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_optionsAkira Matsuda2013-02-013-0/+4
|
* remove dead codeAaron Patterson2013-01-301-4/+1
|
* change parameter name for positional argsAaron Patterson2013-01-301-2/+1
|
* nodoc the helper classes, cache stuff for optimized helperAaron Patterson2013-01-301-13/+17
|
* cache path parts in the instanceAaron Patterson2013-01-301-2/+3
|
* stop evaling a string every timeAaron Patterson2013-01-301-4/+4
|
* moving helper classes outside the private blockAaron Patterson2013-01-301-90/+88
|
* pushing specialization down to the optimized classAaron Patterson2013-01-301-23/+25
|
* use polymorphism to remove conditionalAaron Patterson2013-01-301-35/+27
|
* move conditionals to instanceAaron Patterson2013-01-301-6/+16
|
* pull stuff out of the caller and hide in the instanceAaron Patterson2013-01-301-4/+3
|
* moving more stuff on to the instanceAaron Patterson2013-01-301-18/+18
|
* move optimize_helper? to the helper instanceAaron Patterson2013-01-301-9/+12
|
* moving more stuff to the instanceAaron Patterson2013-01-301-6/+6
|
* moving some stuff to the initializerAaron Patterson2013-01-301-14/+38
|
* moved more evald codeAaron Patterson2013-01-301-8/+7
|
* factored out some of the dynamic codeAaron Patterson2013-01-301-19/+31
|
* use the helpers list rather than getting the methods from the moduleAaron Patterson2013-01-241-1/+1
|
* module_eval is not necessary hereAaron Patterson2013-01-241-3/+1
|