aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/mime_responds_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Resurrecting 1.9 compatibility.Carl Lerche & Yehuda Katz2009-04-131-2/+2
|
* Bring abstract_controller up to date with rails/masterCarl Lerche & Yehuda Katz2009-04-131-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolved all the conflicts since 2.3.0 -> HEAD. Following is a list of commits that could not be applied cleanly or are obviated with the abstract_controller refactor. They all need to be revisited to ensure that fixes made in 2.3 do not reappear in 3.0: 2259ecf368e6a6715966f69216e3ee86bf1a82a7 AR not available * This will be reimplemented with ActionORM or equivalent 06182ea02e92afad579998aa80144588e8865ac3 implicitly rendering a js response should not use the default layout [#1844 state:resolved] * This will be handled generically 893e9eb99504705419ad6edac14d00e71cef5f12 Improve view rendering performance in development mode and reinstate template recompiling in production [#1909 state:resolved] * We will need to reimplement rails-dev-boost on top of the refactor; the changes here are very implementation specific and cannot be cleanly applied. The following commits are implicated: 199e750d46c04970b5e7684998d09405648ecbd4 3942cb406e1d5db0ac00e03153809cc8dc4cc4db f8ea9f85d4f1e3e6f3b5d895bef6b013aa4b0690 e3b166aab37ddc2fbab030b146eb61713b91bf55 ae9f258e03c9fd5088da12c1c6cd216cc89a01f7 44423126c6f6133a1d9cf1d0832b527e8711d40f 0cb020b4d6d838025859bd60fb8151c8e21b8e84 workaround for picking layouts based on wrong view_paths [#1974 state:resolved] * The specifics of this commit no longer apply. Since it is a two-line commit, we will reimplement this change. 8c5cc66a831aadb159f3daaffa4208064c30af0e make action_controller/layouts pick templates from the current instance's view_paths instead of the class view_paths [#1974 state:resolved] * This does not apply at all. It should be trivial to apply the feature to the reimplemented ActionController::Base. 87e8b162463f13bd50d27398f020769460a770e3 fix HTML fallback for explicit templates [#2052 state:resolved] * There were a number of patches related to this that simply compounded each other. Basically none of them apply cleanly, and the underlying issue needs to be revisited. After discussing the underlying problem with Koz, we will defer these fixes for further discussion.
| * Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.Jeremy Kemper2009-03-081-1/+1
| | | | | | | | [#1617 state:resolved]
* | Temporarily modifies setup to call super directly. This can support more ↵Yehuda Katz and Carl Lerche2009-04-081-0/+3
| | | | | | | | T::U runners.
* | Begin unifying the interface between ActionController and ActionViewYehuda Katz2009-01-221-1/+1
|/
* Move controller assertions from base TestCase to AC:: and AV::TestCaseJeremy Kemper2008-11-071-10/+6
|
* Update tests for request memoizationJeremy Kemper2008-08-081-31/+31
|
* Set global ActionController::Base.view_paths for test casesJoshua Peek2008-07-121-2/+0
|
* Disable the Accept header by defaultMichael Koziarski2008-07-071-0/+5
| | | | | | | | 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]
* Set precompiled fixture load path constant to speed up testsJoshua Peek2008-06-251-27/+26
|
* Move missing template logic to ActionViewPratik Naik2008-04-191-1/+1
|
* Make MimeResponds::Responder#any work without explicit types. Closes #11140 ↵Pratik Naik2008-03-071-0/+36
| | | | | | [jaw6] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8987 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Reapply the TemplateFinder first applied in [8669] then reverted in [8676]. ↵Michael Koziarski2008-01-211-5/+1
| | | | | | Closes #10800 [lifofifo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8683 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Revert r8669 for now, breaks Action Mailer. Reopens #10800.Jeremy Kemper2008-01-191-1/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8676 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introduce TemplateFinder to handle view paths and lookups. Closes #10800.Jeremy Kemper2008-01-191-5/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8669 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* require abstract_unit directly since test is in load pathJeremy Kemper2008-01-051-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make sure that setting the format with a symbol works tooDavid Heinemeier Hansson2007-12-031-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8261 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat, consistent load pathsJeremy Kemper2007-10-021-17/+19
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed the layout defaults (closes #9564) [lifo]David Heinemeier Hansson2007-09-281-3/+71
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added another failing testDavid Heinemeier Hansson2007-09-251-0/+24
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7632 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Better failing testsDavid Heinemeier Hansson2007-09-251-5/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7630 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added failing tests for iphoneDavid Heinemeier Hansson2007-09-251-2/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7629 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Updated iphone_with_html_response_type to fail as it uses the new ↵David Heinemeier Hansson2007-09-241-2/+2
| | | | | | register_alias approach git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7625 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that default layouts did not take the format into account #9564 [lifofifo]David Heinemeier Hansson2007-09-181-2/+29
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7514 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that setting request.format would also affect respond_to blocks [DHH]David Heinemeier Hansson2007-09-151-0/+17
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7479 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introduce a default respond_to block for custom types. Closes #8174.Jeremy Kemper2007-05-261-29/+36
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6856 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Parse url-encoded and multipart requests ourselves instead of delegating to CGI.Jeremy Kemper2007-05-181-1/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6764 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* The default respond_to blocks don't set a specific extension anymore, so ↵Rick Olson2007-04-121-5/+7
| | | | | | that both 'show.rjs' and 'show.js.rjs' will work. [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6517 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change default respond_to templates for xml and rjs formats. [Rick]Rick Olson2007-04-081-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6507 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow Controllers to have multiple view_paths instead of a single ↵Rick Olson2007-02-041-1/+1
| | | | | | template_root. Closes #2754 [John Long] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6120 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove unrelated render :yaml changes. References #4185.Jeremy Kemper2006-12-061-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5697 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* More thorough JSON tests. Use application/json by default, per rfc4627. ↵Jeremy Kemper2006-12-061-8/+16
| | | | | | References #4185. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5695 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* respond_to recognizes JSON. render :json => @person.to_json automatically ↵Jeremy Kemper2006-12-061-0/+20
| | | | | | sets the content type and takes a :callback option to specify a client-side function to call using the rendered JSON as an argument. References #4185. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5694 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added the option for extension aliases to mime type registration [DHH] ↵David Heinemeier Hansson2006-12-021-0/+5
| | | | | | Refactored default mime types to use the extension framework instead of just declaring themselves verbosely git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5663 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r5515@ks: jeremy | 2006-10-08 13:24:42 -0700Jeremy Kemper2006-10-081-0/+17
| | | | | | | | | #6281 r5516@ks: jeremy | 2006-10-08 13:29:49 -0700 respond_to :html doesn't assume .rhtml. Closes #6281. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5232 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* respond_to .html now always renders #{action_name}.rhtml so that registered ↵Tobias Lütke2006-08-301-0/+19
| | | | | | | | | custom template handlers do not override it in priority. Custom mime types require a block and throw proper error now. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4860 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Finish custom handling [DHH]David Heinemeier Hansson2006-06-021-0/+16
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4409 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added interrogation of params[:format] to determine Accept type. If :format ↵David Heinemeier Hansson2006-05-311-0/+14
| | | | | | is specified and matches a declared extension, like "rss" or "xml", that mime type will be put in front of the accept handler. This means you can link to the same action from different extensions and use that fact to determine output [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4384 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added test for Accept header for xml_http_request calls in functional tests ↵David Heinemeier Hansson2006-03-181-1/+9
| | | | | | (closes #4222) [agkr@pobox.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3948 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Removed XML argument style for respond_to, so type.xml(object.to_xml) no ↵David Heinemeier Hansson2006-03-181-16/+28
| | | | | | longer works -- it wasnt worth the exception git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3944 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fix broken respond_to testJamis Buck2006-03-181-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3934 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow for respond_to(:html, :js, :xml) (closes #4277) [Caio Chassot]David Heinemeier Hansson2006-03-181-0/+18
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3919 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add MimeResponds::Responder#any for managing multiple types with identical ↵Jamis Buck2006-03-151-0/+21
| | | | | | responses git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3876 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added simple alert() notifications for RJS exceptions when ↵Sam Stephenson2006-03-131-1/+1
| | | | | | config.action_view.debug_rjs = true. Set debug_rjs = true for the default development environment. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3856 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Default mime type for XML should be application/xml [DHH]David Heinemeier Hansson2006-03-121-0/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3849 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Mime types are separated by a comma, not semicolon, in the Accept header. ↵David Heinemeier Hansson2006-03-121-2/+2
| | | | | | Also switch all internal configuration of mime types away from strings and over to Mime::Type [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3847 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added synonym and custom type handling to respond_to [DHH]David Heinemeier Hansson2006-03-121-0/+28
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3844 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Assume that we accept what we give [DHH]David Heinemeier Hansson2006-03-121-0/+18
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3843 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added defaults to respond_to [DHH]David Heinemeier Hansson2006-03-121-0/+38
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3842 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added better support for using the same actions to output for different ↵David Heinemeier Hansson2006-03-111-0/+102
sources depending on the Accept header [DHH] Added Base#render(:xml => xml) that works just like Base#render(:text => text), but sets the content-type to text/xml and the charset to UTF-8 [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3838 5ecf4fe2-1ee6-0310-87b1-e25e094e27de