aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/content_type_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use frozen string literal in actionpack/Kir Shatrov2017-07-291-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-7/+7
|
* modernizes hash syntax in actionpackXavier Noria2016-08-061-2/+2
|
* applies new string literal convention in actionpack/testXavier Noria2016-08-061-1/+1
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Use `Mime[:foo]` instead of `Mime::Type[:FOO]` for back compatJeremy Daer2015-10-061-22/+22
| | | | | | | | | | | | | | | | | Rails 4.x and earlier didn't support `Mime::Type[:FOO]`, so libraries that support multiple Rails versions would've had to feature-detect whether to use `Mime::Type[:FOO]` or `Mime::FOO`. `Mime[:foo]` has been around for ages to look up registered MIME types by symbol / extension, though, so libraries and plugins can safely switch to that without breaking backward- or forward-compatibility. Note: `Mime::ALL` isn't a real MIME type and isn't registered for lookup by type or extension, so it's not available as `Mime[:all]`. We use it internally as a wildcard for `respond_to` negotiation. If you use this internal constant, continue to reference it with `Mime::ALL`. Ref. efc6dd550ee49e7e443f9d72785caa0f240def53
* stop calling deprecated methodsAaron Patterson2015-09-211-22/+22
| | | | | We should be asking the mime type method for the mime objects rather than via const lookup
* Stop using deprecated `render :text` in testPrem Sichanugrist2015-07-171-13/+13
| | | | | | | | | This will silence deprecation warnings. Most of the test can be changed from `render :text` to render `:plain` or `render :body` right away. However, there are some tests that needed to be fixed by hand as they actually assert the default Content-Type returned from `render :body`.
* Add with_default_charset helper.Zuhao Wan2014-05-281-12/+20
|
* Remove deprecated default_charset= from AC::BaseCarlos Antonio da Silva2012-01-171-4/+4
| | | | | This should be set globally as a configuration, using `config.action_dispatch.default_charset` instead
* Remove rescue_action from compatibility module and testsCarlos Antonio da Silva2012-01-171-2/+0
|
* Moved all the logger methods to active support loggerKarunakar (Ruby)2012-01-061-1/+1
| | | | minor
* add missing ensureNeeraj Singh2011-06-101-0/+1
|
* removes the RJS template handlerXavier Noria2011-04-131-9/+0
|
* Deprecate old template handler API. Remove old handlers.José Valim2010-10-101-12/+12
|
* ActionController::Base.use_accept_header is not actually used anymore, so ↵Carl Lerche2010-03-031-12/+0
| | | | let's deprecate it.
* Avoid conflicts with another ContentTypeController used in testingJoshua Peek2009-09-191-8/+7
|
* Got tests to pass with some more changes.Yehuda Katz2009-08-151-1/+1
| | | | | | | | | | | | | | | | * 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".
* Finish making things pass with updated internal content_type semanticsYehuda Katz + Carl Lerche2009-06-151-2/+2
|
* Remove some response content type concepts from ActionViewYehuda Katz + Carl Lerche2009-05-211-1/+2
|
* Support implicit and explicit content typesYehuda Katz + Carl Lerche2009-05-011-0/+10
|
* Temporarily modifies setup to call super directly. This can support more ↵Yehuda Katz and Carl Lerche2009-04-081-0/+3
| | | | T::U runners.
* Include process methods in ActionController::TestCase only. No need to ↵Jeremy Kemper2009-01-091-6/+3
| | | | alias_method_chain :process either.
* Move default content type and charset from Base to Response. Handle charset ↵Jeremy Kemper2008-08-211-0/+20
| | | | = nil.
* Update tests for request memoizationJeremy Kemper2008-08-081-4/+4
|
* Set global ActionController::Base.view_paths for test casesJoshua Peek2008-07-121-2/+0
|
* Fix teardown method name typoJeremy Kemper2008-07-091-1/+1
|
* Disable the Accept header by defaultMichael Koziarski2008-07-071-0/+14
| | | | | | | | 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-12/+12
|
* require abstract_unit directly since test is in load pathJeremy Kemper2008-01-051-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8564 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
* test default content type for implicit rjs template renderRick Olson2006-09-181-0/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5143 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added that respond_to blocks will automatically set the content type to be ↵David Heinemeier Hansson2006-09-171-0/+31
| | | | | | the same as is requested [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5131 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added proper getters and setters for content type and charset [DHH] Added ↵David Heinemeier Hansson2006-09-171-0/+99
utf-8 as the default charset for all renders. You can change this default using ActionController::Base.default_charset=(encoding) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5129 5ecf4fe2-1ee6-0310-87b1-e25e094e27de