Nathaniel Talbott
f024aabee3
Fix filtering parameters when there are Fixnum or other un-dupable values.
...
[#3184 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-10 18:53:50 -07:00
Joshua Peek
1a0f822037
Use draw/connect mapper api instead of directly using add_named_route
2009-09-06 23:21:04 -05:00
Joshua Peek
2ae84e04aa
Add fake controllers for url rewriter tests
2009-09-06 23:02:55 -05:00
Joshua Peek
ab8aac09d6
Need to reset session in internal integration tests after altering the route set
2009-09-06 22:01:58 -05:00
Joshua Peek
9f47f8d892
Fix isolated running of AddressesTest
2009-09-06 21:42:05 -05:00
Joshua Peek
1c02fc295d
Fix isolated running of ActionPackAssertionTest
2009-09-06 21:19:29 -05:00
Joshua Peek
c3accd7ded
Fix failing isolated routing test
2009-09-05 19:39:33 -05:00
Yehuda Katz + Carl Lerche
66a4585f88
Fix the */* with Net::HTTP bug [ #3100 state:resolved]
2009-09-01 15:54:29 -07:00
José Valim
3f78de67b5
Ensure that blocks are also handled inside the responder.
2009-08-29 18:21:19 +02:00
Joshua Peek
ba5995dcd9
Reset session in integration tests after changing routes to reload the middleware stack
2009-08-27 12:43:26 -05:00
Jeffrey Hardy
05b529ca57
UrlRewriter#rewrite_url should call #to_param on the value given in :anchor option, just as #url_for does
...
[#2746 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-26 14:11:26 -07:00
Joshua Peek
78129b1731
Track all AC base subclasses as possible controllers for internal testing
2009-08-25 23:34:48 -05:00
Joshua Peek
b58acea569
Move legacy param_parsers config onto AD::ParamsParser
2009-08-21 16:49:33 -05:00
Joshua Peek
24ad9ae3d2
Cleanup route reloading in tests. Prefer with_routing over using ActionController::Routing::Routes directly
2009-08-16 21:14:26 -05:00
Joshua Peek
911acc10de
Axe "best fit" generation support
2009-08-15 18:08:46 -05:00
Yehuda Katz
1310231c15
Got tests to pass with some more changes.
...
* request.formats is much simpler now
* For XHRs or Accept headers with a single item, we use the Accept header
* For other requests, we use params[:format] or fallback to HTML
* This is primarily to work around the fact that browsers provide completely
broken Accept headers, so we have to whitelist the few cases we can
specifically isolate and treat other requests as coming from the browser
* For APIs, we can support single-item Accept headers, which disambiguates
from the browsers
* Requests to an action that only has an XML template from the browser will
no longer find the template. This worked previously because most browsers
provide a catch-all */*, but this was mostly accidental behavior. If you
want to serve XML, either use the :xml format in links, or explicitly
specify the XML template: render "template.xml".
2009-08-15 12:32:02 -07:00
Yehuda Katz
9f5cd0156a
More cleanup of ActionView and reduction in need for blocks in some cases:
...
* only one of partial_name or :as will be available as a local
* `object` is removed
* Simplify _layout_for in most cases.
* Remove <% render :partial do |args| %>
* <% render :partial do %> still works fine
2009-08-15 12:32:01 -07:00
Joshua Peek
940a391c9b
Attempt to rewrite most of the highly coupled router segments tests
2009-08-14 16:16:29 -05:00
Joshua Peek
f86a4b84dd
Kill routing timed tests
2009-08-14 14:30:19 -05:00
José Valim
8692b11e81
Merge branch 'master' of git://github.com/rails/rails
2009-08-13 10:27:53 +02:00
José Valim
4f9047ecc8
Ensure collections are not treated as nested resources.
2009-08-13 10:27:41 +02:00
Yehuda Katz
4bf516e072
More perf work:
...
* Move #set_cookie and #delete_cookie inline to optimize. These optimizations should
almost certainly be sent back upstream to Rack. The optimization involves using
an ivar for cookies instead of indexing into the headers each time.
* Was able to use a bare Hash for headers now that cookies have their own joining
semantics (some code assumed that the raw cookies were an Array).
* Cache blankness of body on body=
* Improve expand_cache_key for Arrays of a single element (common in our case)
* Use a simple layout condition check unless conditions are used
* Cache visible actions
* Lazily load the UrlRewriter
* Make etag an ivar that is set on prepare!
2009-08-11 15:03:53 -07:00
Joshua Peek
734e903af5
Deprecate router generation "best match" sorting
2009-08-09 22:53:16 -05:00
Hugo Peixoto
202b091373
Added both the documentation and a test case for the collection path name customization feature.
...
[#1218 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 14:26:36 -07:00
José Valim
32bde66aa6
Make http digest work with different server/browser combinations
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 15:53:52 +01:00
Yehuda Katz
d7415f792c
Clean up partial object some more; replace passing around a block to a single block ivar
2009-08-09 04:12:08 -03:00
Jon Wood
271baf235d
Add :redirect to the testable RJS statements [ #2612 state:resolved]
...
Example :
assert_select_rjs :redirect, root_path
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 02:00:15 +01:00
Jan Schwenzien
1f6afe4a74
Fix HTTP basic authentication for long credentials [ #2572 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 01:28:43 +01:00
Dan Croak
00544c778f
Add test ensuring redirect_to uses the given protocol [ #2886 ]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 20:48:39 +01:00
Yehuda Katz
ad98827a78
Merge commit 'jose/responder'
2009-08-08 12:54:02 -03:00
José Valim
6e0ac748e4
Renamed ActionController::Renderer to ActionController::Responder and ActionController::MimeResponds::Responder to ActionController::MimeResponds::Collector.
2009-08-08 17:48:07 +02:00
Yehuda Katz
efcfce50c4
Fixes "Cached fragment hit" written to log even if fragment is not cached (Erik Andrejko) [ #2917 state:resolved]
2009-08-08 12:46:44 -03:00
Jeremy Kemper
43b406bdb0
Ruby 1.9 compat: fix route recognition encoding test
2009-08-07 17:16:34 -07:00
José Valim
aed135d3e2
Renamed presenter to renderer, added some documentation and defined its API.
2009-08-07 17:17:51 +02:00
José Valim
1fd65c80fc
Encapsulate respond_with behavior in a presenter.
2009-08-07 17:16:16 +02:00
José Valim
7034272354
Add destroyed? to ActiveRecord, include tests for polymorphic urls for destroyed objects and refactor mime responds tests and documentation.
2009-08-07 17:16:16 +02:00
José Valim
f59984cc81
Add nagivational behavior to respond_with.
2009-08-07 17:16:15 +02:00
José Valim
dac8927b05
Merge branch 'master' of git://github.com/rails/rails into old
2009-08-07 16:10:17 +02:00
Yehuda Katz
0612fd0f09
Replace _render_template_with_layout with _render_template since the layout is optional
2009-08-07 03:18:45 -03:00
Yehuda Katz
70a440aa27
Clean up render @object a bit more.
2009-08-07 00:52:13 -03:00
Yehuda Katz
503ce1d01c
Update cache_control to be a Hash of options that is used to build the header.
...
* Significantly simplifies setting and modifying cache control in other areas
2009-08-02 19:39:33 -04:00
Jeremy Kemper
f2a35723c8
Ruby 1.9: fix encoding for test_file_stream
2009-08-01 20:26:05 -07:00
Sava Chankov
ec94c2550d
Ruby 1.9: fix Content-Length for multibyte send_data streaming
...
[#2661 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-01 20:25:59 -07:00
José Valim
b2d24baf79
Added tests for nested resources.
2009-07-31 20:56:53 +02:00
José Valim
5b7e81efec
Allow respond_with to deal with http verb accordingly.
2009-07-31 11:59:05 +02:00
José Valim
d209aea7d8
Remove last TODO.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:04 -07:00
José Valim
fa0cf663fe
Add a couple more tests to respond_with.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:03 -07:00
José Valim
09de34ca56
Added respond_with.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:03 -07:00
José Valim
bbe86077c2
Added tests for respond_to class method.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:03 -07:00
José Valim
3e8ba616ef
Refactor even more Responder. Move mime negotiation to request and added respond_to class method.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:02 -07:00