Commit Graph

438 Commits

Author SHA1 Message Date
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
Joshua Peek
570c54c39a Fix cookie access in integration tests with other host names 2010-04-05 15:22:09 -07:00
Xavier Noria
89978f10af moves Object#singleton_class to Kernel#singleton_class to match Ruby also there, same for #class_eval to simplify, and adds coverage for class_eval 2010-04-05 12:15:08 -07:00
José Valim
6690d66292 Rename config.cookie_secret to config.secret_token and pass it as configuration in request.env. This is another step forward removing global configuration. 2010-04-05 12:00:24 +02:00
Xavier Noria
723e91e9fd Merge commit 'docrails/master' 2010-04-04 13:36:15 -07:00
wycats
b546945b51 Reapply redirect {|params, request| } with passing tests this time 2010-04-04 13:17:14 -07:00
Jeremy Kemper
3e5f5f2a48 Revert "Pass in the request as an optional second parameter to redirect"
Was not tested.

This reverts commit a8c3c71af1.
2010-04-04 11:12:19 -07:00
Jeremy Kemper
e3959970e1 Fix signed cookies by explicitly passing config to the cookie jar 2010-04-04 11:10:00 -07:00
Andrew White
00884a5901 Merge branch 'master' of github.com:lifo/docrails 2010-04-04 17:34:23 +01:00
Andrew White
48b2451142 Update various documentation examples to use new routing DSL 2010-04-04 17:34:13 +01:00
wycats
a8c3c71af1 Pass in the request as an optional second parameter to redirect 2010-04-03 21:20:45 -07:00
wycats
ab8bf9e152 * Change the object used in routing constraints to be an instance of
ActionDispatch::Request rather than Rack::Request.

* Changed ActionDispatch::Request#method to return a String, to be
  compatible with the Rack::Request superclass.

* Changed ActionDispatch::Request#method to return the original
  method in the case of methodoverride and #request_method not to,
  to be compatible with Rack::Request
2010-04-03 20:24:30 -07:00
Xavier Noria
11161e6c96 Merge commit 'rails/master' 2010-04-03 10:56:15 -07:00
José Valim
997e22c275 Add a test which ensures action_dispatch.show_exceptions is properly disabled. 2010-04-02 20:54:10 +02:00
Rolf Bjaanes
d898a4ba42 Raise exceptions instead of rendering error templates in test environment [#4315 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-02 20:47:42 +02:00
José Valim
a0cdb0499e Maintain the usage of :as consistent in the router. Whenever it's supplied, it changes the NAMED ROUTE. If you want to change the PATH, use :path instead. Example: resources :projects, :path => 'projetos' 2010-04-02 19:13:47 +02:00
Rizwan Reza
0dd3eac967 Merge branch 'master' of git://github.com/rails/rails 2010-04-02 14:57:30 +04:30
Paul Sadauskas
dc5300adb6 Slightly less annoying check for acceptable mime_types. This allows Accept: application/json, application/jsonp (and the like), but still blacklists browsers. Essentially, we use normal content negotiation unless you include */* in your list, in which case we assume you're a browser and send HTML [#3541 state:resolved] 2010-04-01 17:42:46 -07:00
Xavier Noria
824fa10f4d Merge commit 'rails/master' 2010-03-31 07:47:58 -07:00
Andrew White
1ed1652bef ActionController::Resources has gone away 2010-03-31 14:59:58 +01:00
Andrew White
c10bf8205c Remove routing implementation details from RDoc 2010-03-31 14:54:07 +01:00
Andrew White
e287b53fe3 Update routing documentation to the new way of specifying HTTP method restrictions 2010-03-31 14:19:05 +01:00
Andrew White
7a6b1d54e7 Mark ActionDispatch::Routing::DeprecatedMapper as nodoc to hide old documentation until it's removed 2010-03-31 12:45:29 +01:00
José Valim
62151dd272 Deprecate cookie_verifier_secret in favor of config.cookie_secret allowing signed cookies to work again. 2010-03-31 12:59:41 +02:00
Joshua Peek
cdf8c35ffd Consistent routing language 2010-03-30 14:05:42 -05:00
Joshua Peek
17f0c1e9e8 Fix stack overflow bug in integration test router helpers 2010-03-30 13:58:18 -05:00
Rizwan Reza
cf6734fdf9 Add more tests and docs to uncountable routes. [#3930 state:resolved] 2010-03-28 18:34:48 -07:00
Jan De Poorter
72074aac33 Add _index to named collection routes for uncountable resources (e.g. Sheep)
Signed-off-by: Rizwan Reza <rizwanreza@gmail.com>
2010-03-28 18:34:48 -07:00