Commit Graph

2371 Commits

Author SHA1 Message Date
Jeremy Kemper
db49b7dc94 Fix new year heisenbug 2009-12-31 18:32:16 -08:00
Jeremy Kemper
c4c2502df8 Fix controller runtime test 2009-12-30 22:15:02 -08:00
José Valim
4ecdf24bde Kick AR logging back to life and move ControllerRuntime inside ActiveRecord::Rails. 2009-12-30 13:07:48 +01:00
Yehuda Katz
12e43494a7 Merge remote branch 'jose/perf' 2009-12-27 14:36:59 -08: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
José Valim
75ba102a80 Remove ActionView inline logging to ActiveSupport::Notifications and create ActionController::Base#log_event, so everything can be logged within one listener. Also expose log_process_action as a hook for different modules to include their own information during the action processing. This allow ActiveRecord to hook and any other ORM. Finally, this commit changes 'Processing' and 'Rendering' in logs to 'Processed' and 'Rendered' because at the point it's logged, everying already happened. 2009-12-26 20:28:53 +01:00
Joshua Peek
f53c36350d Expect Rack 1.1 2009-12-26 13:25:35 -06:00
David Heinemeier Hansson
a8f1ee5986 Fix tests 2009-12-25 10:04:26 -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
Jeremy Kemper
24e1b55608 Fix bare string Rack response bodies 2009-12-23 13:06:53 -08:00
Joshua Peek
a1bf2f96ce AD::StatusCodes support is now part of rack 2009-12-22 16:08:03 -06:00
David Heinemeier Hansson
8e48a5ef0c Add test for root 2009-12-21 21:49:36 -08:00
David Heinemeier Hansson
fee07b9da0 Merge branch 'master' of github.com:rails/rails 2009-12-21 15:50:19 -08:00
Joshua Peek
f82e1046f8 reset_session needs to be a real method so flash can override it 2009-12-21 17:29:59 -06:00
David Heinemeier Hansson
fa8849a573 Merge branch 'master' of github.com:rails/rails 2009-12-21 11:28:16 -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
David Heinemeier Hansson
83f4d86a93 Rename the RenderingController module to just plain Rendering 2009-12-20 17:15:31 -08:00
David Heinemeier Hansson
c06aff0a7e Added cookies.permanent, cookies.signed, and cookies.permanent.signed accessor for common cookie actions [DHH] 2009-12-20 14:33:13 -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
David Heinemeier Hansson
fa575973b1 Added alert/notice from 2-3-stable and refactored redirect_to into just living in Redirector [DHH] 2009-12-17 16:37:11 -08:00
Joshua Peek
7ee5843c3c Fully expand relative rails framework paths and make sure we aren't
adding any to the load path more than once.
2009-12-16 11:56:51 -06:00
Joshua Peek
5f8e48cbd2 Move route reloading into railties 2009-12-14 17:54:41 -06:00
Joshua Peek
ce970a8bb9 Remove route loading tests since it should be tested by railties 2009-12-14 16:52:22 -06:00
Joshua Peek
bcb686054a Hush loading AR unless it fails 2009-12-14 16:01:23 -06:00
Joshua Peek
ee395fe626 TestProcess belongs in AD 2009-12-12 18:09:44 -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
Joshua Peek
588225f885 Remove fancy method not allowed resource exceptions since they are
too much of a hack
2009-12-11 00:01:22 -06:00
Joshua Peek
2f90d70049 Kill RouteSet#recognize 2009-12-10 23:45:04 -06:00
Yehuda Katz
8b9275340f Merge branch 'master' of github.com:rails/rails 2009-12-10 13:11:15 -08: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
Carlhuda
f9d570bdd8 Simpler RenderOption API -- removes the need for registering the types and extending a module 2009-12-09 13:40:49 -08:00
Joshua Peek
9fbde11b8b More test porting 2009-12-08 17:41:00 -06:00
Joshua Peek
511cef296b Tack format onto resource routes 2009-12-08 17:19:49 -06:00
Joshua Peek
2be5e088d2 Use new routing dsl in tests 2009-12-08 16:52:26 -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
José Valim
2ecfa817c9 Responder redirects to resource if destroy fails.
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>
2009-12-07 15:05:27 -08:00
Joshua Peek
48127c637c Deprecate recalling generation params when the defaults are nil 2009-12-06 20:40:07 -06:00
Joshua Peek
4663f75f6b Update rackmount to fix some pending tests 2009-12-05 13:10:00 -06:00
Carlhuda
c1304098cc Reorganize autoloads:
* A new module (ActiveSupport::Autoload) is provide that extends
    autoloading with new behavior.
  * All autoloads in modules that have extended ActiveSupport::Autoload
    will be eagerly required in threadsafe environments
  * Autoloads can optionally leave off the path if the path is the same
    as full_constant_name.underscore
  * It is possible to specify that a group of autoloads live under an
    additional path. For instance, all of ActionDispatch's middlewares
    are ActionDispatch::MiddlewareName, but they live under 
    "action_dispatch/middlewares/middleware_name"
  * It is possible to specify that a group of autoloads are all found
    at the same path. For instance, a number of exceptions might all
    be declared there.
  * One consequence of this is that testing-related constants are not
    autoloaded. To get the testing helpers for a given component,
    require "component_name/test_case". For instance, "action_controller/test_case".
  * test_help.rb, which is automatically required by a Rails application's
    test helper, requires the test_case.rb for all active components, so
    this change will not be disruptive in existing or new applications.
2009-12-02 20:01:08 -08:00
Joshua Peek
4dee277a9b Stop escaping "[]" in query string 2009-12-02 12:46:14 -06:00