Commit Graph

465 Commits

Author SHA1 Message Date
Diego Carrion
67a60ee314 Add shallow routes to the new router [Closes #3765] 2010-06-07 18:09:20 -05:00
wycats
d6953cbfd3 regular expressions are usually ASCII-encoded, so force_encoding the content of a Node to the encoding of the regular expression is wrong. 2010-06-07 18:06:08 -04:00
wycats
eebac02606 Make named helpers unprotected without becoming actions [#4696 state:resolved] 2010-06-07 15:29:55 -04:00
José Valim
1a8f784a23 member on resource should not expect an ID. 2010-06-07 11:20:54 +02:00
Rizwan Reza
ac9f8e1b7b Router accepts member routes on resource. [#4624 state:resolved] 2010-06-06 21:27:52 -04:00
Jeremy Kemper
509f3d7d2f Simplify middleware stack lazy compares using named const references 2010-06-05 22:09:16 -07:00
Jeremy Kemper
7ace23abac Restore flash sweep 2010-06-05 22:05:57 -07:00
wycats
a6b3942843 Optimize LookupContext 2010-06-04 20:11:06 -07:00
wycats
b8af484476 No need to unescape params twice if we came from Rack::Mount 2010-06-04 20:11:06 -07:00
wycats
cb1b2a719a Stop the flash middleware from forcibly loading sessions even if the user doesn't use sessions at all 2010-06-04 20:11:05 -07:00
wycats
ab1407cc5b Improve performance of commonly used request methods 2010-06-04 20:11:04 -07:00
Jeremy Kemper
bd9805871b Include backtrace in failsafe log. Rescue possible exceptions in failsafe response. 2010-06-04 18:25:32 -07:00
José Valim
9a93844aba Add :only and :except to controllers MiddlewareStack. This allows
you to do the following:

  class PostsController < ApplicationController
    use AutheMiddleware, :except => [:index, :show]
  end
2010-05-30 15:53:14 +02:00
José Valim
19d8c8cbe4 Remove the laziness from the middleware stack. 2010-05-29 22:29:46 +02:00
wycats
45e60283e7 Removing Metal from Rails 3.
If you have existing Metals, you have a few options:
* if your metal behaves like a middleware, add it to the
  middleware stack via config.middleware.use. You can use
  methods on the middleware stack to control exactly where
  it should go
* if it behaves like a Rack endpoint, you can link to it
  in the router. This will result in more optimal routing
  time, and allows you to remove code in your endpoint
  that matches specific URLs in favor of the more powerful
  handling in the router itself.

For the future, you can use ActionController::Metal to get
a very fast controller with the ability to opt-in to specific
controller features without paying the penalty of the full
controller stack.

Since Rails 3 is closer to Rack, the Metal abstraction is
no longer needed.
2010-05-29 20:08:00 +02:00
José Valim
d3e62fc57c Avoid creating a Rack::Response object in the cookie middleware since it may stream the body. 2010-05-18 17:47:56 +02:00
José Valim
c536835957 Cut the fat and make session stores rely on request.cookie_jar and change set_session semantics to return the cookie value instead of a boolean. 2010-05-18 03:18:23 +02:00
José Valim
26e645fa00 Remove deprecated methods since 2-3-stable. 2010-05-18 02:11:50 +02:00
José Valim
0c3cde404a Kill legacy dispatcher. 2010-05-18 02:07:59 +02:00
José Valim
25f7c030e4 Simplify cookie_store by simply relying on cookies.signed. 2010-05-18 02:05:20 +02:00
José Valim
941b653627 Rely on set and delete cookie logic from rack. 2010-05-18 01:51:45 +02:00
José Valim
107c6381a0 Allow root to be given in the resources scope without need to specify :on => collection. 2010-05-17 17:39:32 +02:00
Martin
e807476d31 added convenience methods #notice and #alert to flash.now
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-15 16:52:19 +02:00
Paco Guzman
cdf700147c fix assert_select messages to its declaration behaviour
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-15 16:31:36 +02:00
Josh Kalderimis
446b0ffe1c corrected error message in session/cookie_store [#4546 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-10 12:37:01 +03:00
José Valim
6c2d974e15 Use annoted source code in Template:Error to avoid special cases in the show exceptions middleware. 2010-05-09 12:52:30 +03:00
Lawrence Pit
1e1d30715e Fix parsing xml input by ActionDispatch::ParamsParser
[#4437 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-05-06 20:34:47 -07:00
Carl Lerche
6c280f3398 RouteSet does not raise ActionController::RoutingError when no routes match anymore. Instead, it follows the X-Cascade convention. ShowExceptions checks for X-Cascade so that the routing error page can still be displayed. 2010-04-30 16:40:42 -07:00
Santiago Pastorino
920df0a475 Make ActionDispatch url_for use HWIA symbolize_keys
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-22 09:06:55 -07:00
J Smith
275e839b8d Ensure that url_for uses symbolized keys in the controller. [#4391]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-22 16:47:36 +02:00
Santiago Pastorino
961aa70e4a Some require indifferent_access added
Signed-off-by: Xavier Noria <fxn@ubuntu.(none)>
2010-04-21 07:45:29 -07:00
Santiago Pastorino
5467728d83 require without .rb
Signed-off-by: Xavier Noria <fxn@ubuntu.(none)>
2010-04-21 07:41:45 -07:00
José Valim
da32661f10 Remove only formats in shortcuts and do it just once. 2010-04-20 21:19:48 +02:00
Santiago Pastorino
978c80d6e3 Missing require added 2010-04-18 14:02:46 -03:00
Diego Carrion
8c7e8976e9 added shorthand support for routes like /projects/status(.:format)
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-17 17:53:08 -07:00
David Chelimsky
4327ad51ab access assigns as a method or hash, with strings or symbols [#4431 state:resolved] 2010-04-17 15:59:10 -04:00
wycats
457f7709e9 Missing requires 2010-04-16 21:59:09 -04:00
Mislav Marohnić
8a91ccf976 add missing requires to Rescuable and RouteSet [#4415 state:committed]
Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-04-16 06:11:38 -07:00
Matthew Rudy Jacobs
fc22552e5f action_dispatch/routing/deprecated_mapper needs with_options
[#4398 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-14 21:43:35 -07:00
José Valim
86defed5ad Fix a bug in url generation for generic routes. 2010-04-12 20:23:35 +02:00
José Valim
a8b1ca26d7 Ensure match path, :controller => name works as expected. 2010-04-12 16:49:41 +02:00
Santiago Pastorino
5b89fd07b2 Make namespace work with options[:to] [#4351 state:committed]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-11 12:05:43 +02:00
wycats
381f877bbb Revert "Revert "Use path_names, not resource_path_names, consistently""
This reverts commit d3ec4b1ba6.
2010-04-10 15:54:29 -04:00
José Valim
d3ec4b1ba6 Revert "Use path_names, not resource_path_names, consistently"
Breaks tests on Ruby 1.8.7.
This reverts commit 13bbf98d85.
2010-04-10 10:47:40 +02:00
wycats
13bbf98d85 Use path_names, not resource_path_names, consistently 2010-04-10 02:56:28 -04:00
Jeremy Kemper
7353fc1595 Dial back from 'namespace :controller => ...' to 'scope :module => ...' 2010-04-09 23:09:15 -07:00
Jeremy Kemper
ac0280c39d Routes can be selectively namespaced by path or controller module 2010-04-09 21:48:35 -07:00
Jeremy Kemper
3957d44fd1 Use request.body IO and rewind, if possible 2010-04-07 11:42:07 -07:00
Joshua Peek
086392492c Remove #size call on rack input io 2010-04-07 11:41:14 -07:00
José Valim
eb063538bd Use config.filter_parameters on in-browser request dump. [#4335 state:resolved] 2010-04-07 01:42:51 +02:00