Commit Graph

119 Commits

Author SHA1 Message Date
José Valim
19787e6259 Should allow symbols in :only and :except in routes. 2010-02-16 22:39:08 +01:00
José Valim
22c0390085 Add a test which ensures namespaced roots. 2010-02-06 11:52:28 +01:00
Mikel Lindsaar
2ebea1c02d deOMGifying Railties, Active Support, and Action Pack 2010-01-31 09:46:30 -08:00
José Valim
8974dac92e Ensure root routes inside optional scopes works as expected. 2010-01-26 00:55:26 +01:00
José Valim
02908e1142 As first step setup the load path and lazy compare middlewares. 2010-01-25 22:59:08 +01:00
José Valim
fc4f237864 Make filter parameters based on request, so they can be modified for anything in the middleware stack. 2010-01-21 16:52:49 +01:00
José Valim
378464a2e4 Default to sync instrumentation. 2010-01-21 13:09:12 +01:00
José Valim
31fddf2ace Tidy up new filter_parameters implementation. 2010-01-21 11:57:24 +01:00
Prem Sichanugrist
bd4f21fbac Move filter_parameter_logging logic out of the controller and create ActionDispatch::ParametersFilter to handle parameter filteration instead. This will make filteration not depending on controller anymore.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-01-21 10:08:26 +01:00
Joshua Peek
88ffba2329 Disable ShowExceptions during integration tests 2010-01-19 09:06:21 -06:00
José Valim
4e2852a487 Do not send rack.input or any other rack information to AD listeners. 2010-01-19 15:35:23 +01:00
Prem Sichanugrist
eb67532bc1 Make local_request? to returns true when facing ::1 IPv6 address [#3257 status:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-01-17 16:56:54 +01:00
José Valim
27d9836ad3 Add ActionDispatch::Railties::Subscriber and finish tidying up the logging. 2010-01-17 12:43:17 +01:00
José Valim
0334f9f6cf Add ActionDispatch::Notifications middleware. 2010-01-17 11:29:51 +01:00
Joshua Peek
d2d4acf027 Cookies middleware 2010-01-16 17:22:27 -06:00
Joshua Peek
e9a1dbe79a Allow custom controller for resource(s) [#3703 state:resolved] 2010-01-16 15:16:22 -06:00
José Valim
5a5760828b Add tests for simple match with namespace. 2010-01-15 23:36:03 +01:00
Joshua Peek
b2578a148c Fix singleton resource named routes 2010-01-15 16:31:00 -06:00
Joshua Peek
576b8dda52 Cleanup internal resource macro to use method helper shorthand 2010-01-15 16:13:01 -06:00
Joshua Peek
184ef28f55 Routing method shorthand shouldn't clobber :to options 2010-01-15 14:55:13 -06:00
Joshua Peek
3eaf525213 Make HEAD method masquerade as GET so requests are routed correctly 2010-01-15 12:38:50 -06:00
José Valim
4598d88749 Ensure log is flushed and tailed on failures. 2010-01-15 14:16:52 +01:00
José Valim
8c8942ed4f Move Dispatcher setup to Railties and add instrumentation hook. 2010-01-15 12:24:30 +01: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
Joshua Peek
3f28e0bda6 Trash string coercion rack hacks 2010-01-04 19:46:21 -06:00
José Valim
f2d276fefd Ensure no notification is on the queue before running notifications related tests. 2010-01-03 23:39:09 +01:00
José Valim
53c6984944 Add notifications to ActionDispatch::ShowExceptions, this can be used as hooks for plugins like ExceptionNotifier. 2010-01-03 23:33:34 +01: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
Joshua Peek
f53c36350d Expect Rack 1.1 2009-12-26 13:25:35 -06: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
Jeremy Kemper
24e1b55608 Fix bare string Rack response bodies 2009-12-23 13:06:53 -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
2419fae092 Pending tests for AD Response 2009-12-17 22:10:37 -06:00
Joshua Peek
3b44f35e24 Don't need response prepare! 2009-12-17 22:10:37 -06: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