Joshua Peek
184ef28f55
Routing method shorthand shouldn't clobber :to options
2010-01-15 14:55:13 -06:00
Joshua Peek
be968ecd8b
Respect resources_path_names and :path_names options in new dsl
2010-01-13 20:26:01 -06:00
José Valim
35933822de
Ensure optional path scopes are properly handled.
2010-01-14 01:31:17 +01:00
Joshua Peek
d01716731b
Add router support for resources :only and :except actions
2010-01-13 17:23:14 -06:00
Joshua Peek
5d787590f2
Cool this routing test passes now
2010-01-13 16:42:47 -06:00
Joshua Peek
bf9b81e2cb
Pass :as to resources to change the resource name
2010-01-13 12:18:06 -06:00
Joshua Peek
521ef3c40f
Passing in a crud action overloads the default action instead of creating a
...
new member action.
2010-01-13 11:45:27 -06:00
José Valim
8d72ba51ba
Ensure nested namespaces work as expected.
2010-01-10 18:42:45 +01:00
Joao Carlos
36969c6ecd
Fixes namespaced routes [ #3673 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-01-10 12:49:31 +01:00
José Valim
0d5ce7c525
namespace in routes changes both the path and name prefix.
2010-01-06 09:51:46 +01:00
José Valim
e55d70a380
redirect in routes takes port into account [ #3653 status:resolved]
2010-01-05 23:40:56 +01:00
Joshua Peek
b3900a29eb
All router redirect helper to accept a full URI [ #3653 state:resolved]
2010-01-05 12:00:38 -06:00
David Heinemeier Hansson
95762cbbb3
Added shorthand for match 'products/overview' that expands to match 'products/overview', :to => 'products#overview', :as => 'products_overview'
2009-12-27 14:13:03 -08:00
David Heinemeier Hansson
38af368360
Merge
2009-12-24 15:24:57 -08:00
David Heinemeier Hansson
2b7256a42e
Extract Mapping class from monster match method
2009-12-24 15:23:39 -08:00
Sam Ruby
aa3565f3a6
Allow named_routes to be used with root, and with new DSL short-form.
...
The real use case it to make all of the following act the same:
root 'store#index', :as => 'store'
match '/' => 'store#index', :as => 'store'
match '/', :to => 'store#index', :as => 'store'
The test case provided deviates from this in order to demonstrate all three
forms in a single set of test routes.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-12-23 20:55:21 -08:00
Jeremy Kemper
4d3602a8c4
Routing: fix that route shorthand shouldn't ignore other options. Raise if :as option is given to root method since its name is always 'root'
2009-12-23 17:42:30 -08:00
David Heinemeier Hansson
8e48a5ef0c
Add test for root
2009-12-21 21:49:36 -08:00
David Heinemeier Hansson
3ff9e9ee14
Its now possible to use match 'stuff' => 'what#stuff' instead of using the :to for simple routes
2009-12-20 20:37:36 -08:00
Yehuda Katz
e48b4c2dd0
:to => redirect() can take a String using 1.9-style interpolation or proc that takes the path parameters as a Hash
2009-12-20 14:07:32 -08:00
Joshua Peek
2297eaed5b
"new" and "edit" name routes always need to be prepend to the
...
named_route [#3561 state:resolved]
2009-12-11 12:46:50 -06:00
Joshua Peek
ec5434c3c2
Check block arity passed to routes draw so you don't need to use
...
|map|
2009-12-09 20:46:32 -06:00
Joshua Peek
511cef296b
Tack format onto resource routes
2009-12-08 17:19:49 -06:00
Joshua Peek
ac711043ec
Fix ambiguous access_token scoping example
2009-12-08 16:15:25 -06:00
Joshua Peek
3d91d7f0a2
Routes added under resource collection should be prefixed with
...
resource collection name
2009-12-08 15:31:56 -06:00
Joshua Peek
1fc58a889d
Fixed named prefix scope in resource member and collection actions
2009-12-07 20:57:01 -06:00
Joshua Peek
5835447b6f
named_prefix doesn't join with "_"
2009-12-07 19:31:29 -06:00
Joshua Peek
e8489b43e2
Allow name_prefix to be pass into scope
2009-12-07 19:24:33 -06:00
Joshua Peek
40ad54e381
Allow scope to take :path and :controller options
2009-12-07 18:28:02 -06:00
Joshua Peek
075f50d62c
Fix some nested resource generation tests
2009-11-29 18:17:14 -06:00
Joshua Peek
5df26dd7a9
Add basic nested named route support to new routing dsl. Also add a
...
bunch of pending tests.
2009-11-19 09:04:53 -08:00
Jeremy Kemper
52e2bbd5c0
Ruby 1.9: work around constant resolution behavior change :(
2009-11-04 14:51:54 -08:00
Joshua Peek
f950d0b4af
Fix simple resource named routes for new routing dsl
2009-11-03 11:23:22 -06:00
Joshua Peek
07da304ff8
Some more generation tests
2009-10-27 21:02:21 -05:00
Joshua Peek
43e0bc1c9f
Extract routing controller stub helper into abstract unit
2009-10-27 21:02:20 -05:00
Joshua Peek
e296ea056e
Enable named route tests
2009-10-27 21:02:20 -05:00
Joshua Peek
759f2ccc4c
Start migrating AC routing tests into dispatch folder
2009-10-27 21:02:20 -05:00