Commit Graph

940 Commits

Author SHA1 Message Date
Pratik Naik
6577942b61 Deprecate render_component.
Please install render_component plugin from http://github.com/rails/render_component/tree/master
if your application uses this functionality.
2008-08-29 13:43:30 +01:00
Jeremy Kemper
766fb54c8f Fix indentation 2008-08-28 12:35:47 -07:00
Brennan Dunn
9cc8c0a0a1 Routes may be restricted to lists of HTTP methods instead of a single method or :any.
[#407 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-08-28 12:29:49 -07:00
Brennan Dunn
7bdd5b768e Accept an array of method symbols for collection/member actions of resources
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-08-28 12:23:39 -07:00
Joshua Peek
acbf2b74aa Deprecated implicit local assignments when rendering partials 2008-08-28 10:37:46 -05:00
Michael S. Klishin
e42a235dd1 Request#remote_ip handles the uncommon case that REMOTE_ADDR is a comma-separated list.
[#523 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-08-27 23:03:11 -07:00
Tim Haines
82778351a8 Add TestUploadFile.content_type= to match Request.UploadedFile
[#920 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-08-27 18:50:29 -07:00
Jeremy Kemper
e6a66cbd05 update rack tests for default response content_type and charset 2008-08-21 18:16:16 -07:00
Jeremy Kemper
f8f077945f Move default content type and charset from Base to Response. Handle charset = nil. 2008-08-21 18:11:09 -07:00
Tarmo Tänav
98fb161dbb Allow polymorphic_url helper to take url options. [#880 state:resolved]
All *_polymorphic_url, *_polymorphic_path helpers can now accept
an options hash which will be passed on to the named route
making it possible to generate polymorphic routes with additional
url parameters.

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-08-21 20:26:00 +01:00
Joshua Peek
47cd8b81cc Switched integration test runner to use Rack processor instead of CGI 2008-08-20 13:37:18 -05:00
Joshua Peek
a74dbe6c52 Improve test coverage for integration tests cookie header 2008-08-20 13:22:36 -05:00
Joshua Peek
6f530de944 Test coverage for integration testing with parameters 2008-08-19 20:15:51 -05:00
Ryan Bates
a8ece12fe2 Return nil instead of a space when passing an empty collection or nil to 'render :partial' [#791 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-08-19 19:09:04 -05:00
Joshua Peek
71c4ff07ab Delegate xhr helper method to integration session 2008-08-19 18:53:46 -05:00
Ryan Bates
38c7d73e73 pass yielded arguments to block for ActionView::Base#render with :layout [#847 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-08-17 19:29:24 -05:00
Joshua Peek
dbb0abfb7e More integration test coverage 2008-08-17 19:18:18 -05:00
Joshua Peek
b8e930aa01 Merge RackProcess#normalize_headers logic into AbstractResponse#prepare! 2008-08-17 19:09:38 -05:00
Joshua Peek
894f9ccc53 Use RackRequest as a mock instead of StubCGI into RequestTest 2008-08-17 19:04:01 -05:00
Jeremy Kemper
45b79d933c Merge branch 'conditional-get' 2008-08-12 17:03:17 -07:00
Cameron Yule
2faf35cea9 Added tests for partial collection counters [#766 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-08-09 10:48:56 -05:00
Jeremy Kemper
ba2d61dd81 Update tests for request memoization 2008-08-08 02:31:12 -07:00
Jeremy Kemper
b7529ed1cc Simplifying usage of ETags and Last-Modified and conditional GET requests 2008-08-07 23:43:12 -07:00
Joshua Peek
b2504f8ba0 Tidy up ActionMailer rendering logic to take advantage of view path cache instead of using file system lookups 2008-08-06 20:11:21 -05:00
Tarmo Tänav
656f0e7c6c Fix file permissions
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-07-31 16:36:23 -05:00
Joshua Peek
a5db148825 Prepare Route#generate and Route#recognize early. Also refactor segments a bit to try to make immutable. 2008-07-28 13:41:42 -05:00
Joshua Peek
e0513e33c4 Routing whitespace cleanup 2008-07-28 13:38:20 -05:00
Joshua Peek
a87462afcb AbstractRequest.relative_url_root is no longer automatically configured by a HTTP header. It can now be set in your configuration environment with config.action_controller.relative_url_root 2008-07-24 13:41:51 -05:00
Joshua Peek
2681685450 Extract ActiveSupport::TypedArray class to ensure an array is all of the same type [#673 state:resolved] 2008-07-22 11:12:16 -05:00
Tom Ward
d39485078e Raise ArgumentError if an invalid method is specified as part of a route's conditions. Also raise an error if HEAD is specified as the method, as rails routes all HEAD requests through the equivalent GET, though doesn't return the response body [#182 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-07-18 20:19:03 -05:00
Tom Ward
c3d1fda555 Set the response content type to that of found template if not explicitly set elsewhere [#444 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-07-18 20:14:12 -05:00
Joshua Peek
d2ccb852d4 Removed lagacy TemplateHandler#render API. Left in a legacy TemplateHandler and Compilable stub so plugins will not have to change anything. 2008-07-18 16:00:20 -05:00
Jeremy Kemper
57a2780f14 etag! and last_modified! conditional GET helpers 2008-07-17 23:18:10 -07:00
Pratik Naik
99930d499e Fix symbol cookie test 2008-07-17 18:19:09 +01:00
Ripta Pasay
f7fdbae770 Use fully-qualified controller name when logging. [#600 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-17 01:33:44 +01:00
Pratik Naik
90c930f45c Allow Dispatcher exceptions to be handled in application.rb using rescue_from 2008-07-16 18:54:08 +01:00
Pratik Naik
2a7aca8ec3 Improve rack/cgi tests 2008-07-16 05:07:34 +01:00
Pratik Naik
1d002f6bcb Make RackRequest#request_method respect _method 2008-07-16 05:02:29 +01:00
Pratik Naik
5cc3ea6969 RackResponse should not contain Status header 2008-07-16 04:17:28 +01:00
Pratik Naik
3343eb428c Tests for rack response content type 2008-07-16 04:09:41 +01:00
Pratik Naik
89eec91e67 Add tests for CgiRequest#content_type 2008-07-16 03:31:45 +01:00
Pratik Naik
0f8206104e RackRequest#content_type should return Mime::Type 2008-07-16 03:18:35 +01:00
Joshua Peek
8b306bf24c Improved test coverage for fragment cache helper 2008-07-15 20:54:17 -05:00
Joshua Peek
aca246ab25 Get buffer for fragment cache from template's @output_buffer 2008-07-15 14:43:52 -05:00
Michael Koziarski
24a8ae4e08 Try to get more useful errors out of the test_line_offset failures 2008-07-15 20:39:36 +02:00
Joshua Peek
e0fef66149 Made ActionView::Base#first_render a little more private. And added _last_render to track the most recent render. Will fix #609 as a side effect. [#609 state:resolved] 2008-07-13 13:26:48 -05:00
Joshua Peek
73b34e9f75 Refactor template preloading. New abstractions include Renderable mixins and a refactored Template class. 2008-07-12 14:33:46 -05:00
Joshua Peek
30204c4e66 Set global ActionController::Base.view_paths for test cases 2008-07-12 14:11:51 -05:00
Joshua Peek
65fb2e76f2 Removed a few implementation specific view path tests 2008-07-12 12:17:10 -05:00
Michael Koziarski
e53f5fe696 Restore support for partial matches in assert_redirected_to
If both the actual redirection and the asserted redirection are hashes, succeed if the asserted redirection is a strict subset of the actual redirection.
2008-07-12 11:42:41 +02:00