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
Joshua Peek
6ebdd0e32b
Changed ActionView::TemplateHandler#render API method signature to render(template, local_assigns = {})
2008-07-11 15:40:41 -05:00
Joshua Peek
04a87af5b7
Ensure use_accept_header is enabled for test_action_cache_conditional_options
2008-07-11 11:51:35 -05:00
Joshua Peek
d106f2d08a
Ensure use_accept_header is enabled for test_action_cache_conditional_options
2008-07-11 11:49:22 -05:00
Joshua Peek
15b2175426
Fixed teardown method typo (plus whitespace)
2008-07-11 11:44:24 -05:00
Jeremy Kemper
a6d0ae28e3
Fix teardown method name typo
2008-07-09 10:42:30 -07:00
Jeremy Kemper
4354aa36fb
Rendering default template for missing actions works with non-word characters in action name
2008-07-09 10:42:29 -07:00
Michael Koziarski
2f4aaed7b3
Disable the Accept header by default
...
The accept header is poorly implemented by browsers and causes strange errors when used on public sites where crawlers make requests too. You should use formatted urls (e.g. /people/1.xml) to support API clients. Alternatively to re-enable it you need to set:
config.action_controller.use_accept_header = true
A special case remains for ajax requests which will have a javascript format for the base resource (/people/1) if the X-Requested-With header is present. This lets ajax pages still use format.js despite there being no params[:format]
2008-07-07 07:31:49 +02:00