Commit Graph

1575 Commits

Author SHA1 Message Date
wycats
8e9df34fa3 Merge branch 'master' of github.com:rails/rails 2010-04-13 14:07:46 -07:00
Stanko Alexander
dc251389d1 Add test case which check content type when rendering rjs partial in html template
Signed-off-by: wycats <wycats@gmail.com>
2010-04-13 13:09:41 -07:00
Anil Wadghule
518891f490 Use correct RUBY_PLATFORM regex for Windows env [#4385 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-13 12:39:03 -07:00
José Valim
ece157e950 Move verification to a plugin as well: http://github.com/rails/verification.git 2010-04-10 11:47:20 +02:00
Carl Lerche
99d5459921 Fixed that default locale templates should be used if the current locale template is missing [DHH] 2010-04-08 18:11:26 -07:00
Michael Koziarski
82514c2897 Add accessors for request and response so tests don't have to mess with internal ivars 2010-04-09 11:30:39 +12:00
Joshua Peek
570c54c39a Fix cookie access in integration tests with other host names 2010-04-05 15:22:09 -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
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
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
167017f655 Tests method_missing to raise NameError. [#2522 state:resolved]
Signed-off-by: wycats <wycats@gmail.com>
2010-03-27 00:26:44 -07:00
wycats
15c31c7639 open_session can just return the a dup of the current context.
At this point, its entire purpose in the open_session {} case was to
delegate back to the IntegrationTest anyway.
2010-03-22 17:14:28 -07:00
José Valim
13bb4a6e68 Current url helpers become actions in controller. Added a failing test case for it. 2010-03-22 23:57:06 +01:00
wycats
e1c030edd8 Fixed a bunch of tests that failed in 1.9 because they assumed that a Rack response was a String. 2010-03-19 18:46:29 -07:00
José Valim
f28d856cec Improve performance of the rendering stack by freezing formats as a sign that they shouldn't be further modified. 2010-03-19 17:20:20 +01:00
Santiago Pastorino
e629e21135 remove duplicated self.view_paths assingment on controller tests [#4206 state:commited]
Signed-off-by: wycats <wycats@gmail.com>
2010-03-18 17:50:28 -07:00
Carlhuda
1dacc19702 Return a valid Rack response from bare ActionController::Metal 2010-03-18 17:32:53 -07:00
Carlhuda
edb5991a14 Make render :partial, :layout consistent between AC and AV 2010-03-18 16:55:32 -07:00
Carlhuda
71c9337f45 All tests pass without memoizing view_context 2010-03-18 15:52:43 -07:00
Mathias Biilmann Christensen
c8dd6f224c Deleting and setting a cookie in the same request was broken
Made sure to remove a cookie from @deleted_cookies when set

[#4211 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-17 18:04:32 -07:00
Carlhuda
d9375f3f30 Modify assert_template to use notifications. Also, remove ActionController::Base#template since it is no longer needed. 2010-03-17 16:29:35 -07:00
Carlhuda
6416a35f4b Remove unneeded AV::Base and AV::Template monkey-patches 2010-03-17 14:29:18 -07:00
José Valim
56fb60ebfe Fix rendering of HTML partials inside JS templates [#4197 status:resolved] 2010-03-16 23:36:29 +01:00
Carlhuda
c61ed70b00 Some more tweaks on <% %>.
* The cache helper is now semantically "mark this region for caching"
  * As a result, <% x = cache do %> no longer works
2010-03-16 11:43:04 -07:00
Jeremy Kemper
b65b989725 Break a window :/ 2010-03-15 23:49:35 -07:00
Carlhuda
9de83050d3 Add deprecation notices for <% %>.
* The approach is to compile <% %> into a method call that checks whether
    the value returned from a block is a String. If it is, it concats to the buffer and
    prints a deprecation warning.
  * <%= %> uses exactly the same logic to compile the template, which first checks
    to see whether it's compiling a block.
  * This should have no impact on other uses of block in templates. For instance, in
    <% [1,2,3].each do |i| %><%= i %><% end %>, the call to each returns an Array,
    not a String, so the result is not concatenated
  * In two cases (#capture and #cache), a String can be returned that should *never*
    be concatenated. We have temporarily created a String subclass called NonConcattingString
    which behaves (and is serialized) identically to String, but is not concatenated
    by the code that handles deprecated <% %> block helpers. Once we remove support
    for <% %> block helpers, we can remove NonConcattingString.
2010-03-15 14:50:43 -07:00
Andrew White
96bc6bcfee Don't force singularization of singleton resource names, e.g. /preferences [#4089 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2010-03-15 09:45:29 -05:00
Jeremy Kemper
16572fd46e read_ and write_fragment cache preserve html safety yet cache strings only 2010-03-14 19:09:32 -07:00
José Valim
4ba334c0f4 Ensure controller filters are executed before stuff starts to happen. 2010-03-13 21:28:34 +01:00
José Valim
6c027443b0 Add tests for lookup context. 2010-03-11 13:23:14 +01:00
Joshua Peek
dcd110c724 skip_relative_url_root url_for option is dead 2010-03-09 21:25:09 -06:00
Joshua Peek
4d2470f7da RouteSet#rewrite => url_for 2010-03-09 21:00:24 -06:00
Joshua Peek
7db80f87e9 Move AC::UrlRewriter onto route set 2010-03-09 20:50:35 -06:00
Justin Ko
ea4f8ef33f Reinstate dom_id in controllers.
[#3040 state:committed]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-09 10:49:36 -08:00
wycats
de79525d04 Get rid of the instance-level URL rewriter 2010-03-09 10:20:56 -08:00
Jeremy Kemper
c507e16dba Reinstate default_url_options and remove url_options= writer 2010-03-08 21:40:45 -08:00
José Valim
8f082ff421 Clean LookupContext API. 2010-03-08 23:25:16 +01:00
Carlhuda
900a2d304a Get rid of relative_url_path in favor of respecting SCRIPT_NAME. Also added a way to specify a default SCRIPT_NAME when generating URLs out of the context of a request. 2010-03-04 17:43:46 -08:00
Carlhuda
ff29606c06 Refactor cache_store to use ActionController config 2010-03-04 16:50:57 -08:00
Carlhuda
e311622e7b Deprecated ActionController::Base.session_options= and ActionController::Base.session_store= in favor of a config.session_store method (which takes params) and a config.cookie_secret variable, which is used in various secret scenarios. The old AC::Base options will continue to work with deprecation warnings. 2010-03-04 16:05:52 -08:00
Jeremy Kemper
5e3e5ac12b Clarify cookie jar test 2010-03-04 15:31:28 -08:00
wycats
70916f6a9c Fixes test ordering bug (ht: evan) 2010-03-04 12:21:12 -08:00
Carl Lerche
5ce25aecee Merge branch 'configuration_refactor' 2010-03-03 22:35:43 -08:00
Carl Lerche
18bcce596e ActionController::Base.use_accept_header is not actually used anymore, so let's deprecate it. 2010-03-03 21:24:00 -08:00
Carl Lerche
fb14b8c6fd ActionDispatch::Request deprecates #request_uri
* Refactored ActionPatch to use fullpath instead
2010-03-03 21:24:00 -08:00
Carl Lerche
eb49bd6949 Fix tests for the request refactor 2010-03-03 21:24:00 -08:00
Carlhuda
5e0a05b8cb Tweak the semantic of various URL related methods of ActionDispatch::Request 2010-03-03 21:23:34 -08:00
Yehuda Katz
2a60cc6822 don't depend on the order of cookies (Hash ordering bug) 2010-03-03 16:07:23 -08:00