Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | only call self.content_type= when there is a response | Aaron Patterson | 2015-08-26 | 1 | -3/+5 |
| | | | | | Apparently the AbstractController (whatever "abstract" means) is expected to work without a request and response. | ||||
* | Pull `plain` content type handling up to `render` | Aaron Patterson | 2015-08-26 | 1 | -6/+2 |
| | | | | | `render` is the only possible source for the `plain` option. Pulling the conditional up to the `render` method removes far away conditionals | ||||
* | stop passing the options hash to `_process_format` | Aaron Patterson | 2015-08-26 | 1 | -2/+2 |
| | | | | | | We don't need to pass the full hash just to pull one value out. It's better to just pass the value that the method needs to know about so that we can abstract it away from "options" | ||||
* | Add deprecation warning for `render :text` | Prem Sichanugrist | 2015-07-17 | 1 | -0/+14 |
| | | | | | | We've started on discouraging the usage of `render :text` in #12374. This is a follow-up commit to make sure that we print out the deprecation warning. | ||||
* | Deprecate `:nothing` option for render method | Mehmet Emin İNAÇ | 2015-05-28 | 1 | -0/+1 |
| | | | | `head` method works similar to `render` method with `:nothing` option | ||||
* | Add ActionController::Base.render | brainopia | 2015-01-22 | 1 | -0/+3 |
| | |||||
* | Add ActionController::Renderer | brainopia | 2015-01-22 | 1 | -0/+8 |
| | | | | Render arbitrary templates outside of controller actions | ||||
* | Removed single space padding from empty response body. | Godfrey Chan | 2014-07-10 | 1 | -6/+2 |
| | | | | | | | | | | | | `render nothing: true` or rendering a `nil` body no longer add a single space to the response body. The old behavior was added as a workaround for a bug in an early version of Safari, where the HTTP headers are not returned correctly if the response body has a 0-length. This is been fixed since and the workaround is no longer necessary. Use `render body: ' '` if the old behavior is desired. | ||||
* | Do note remove `Content-Type` when `render :body` | Prem Sichanugrist | 2014-03-05 | 1 | -3/+1 |
| | | | | | | | | | | | | | `render :body` should just not set the `Content-Type` header. By removing the header, it breaks the compatibility with other parts. After this commit, `render :body` will returns `text/html` content type, sets by default from `ActionDispatch::Response`, and it will preserve the overridden content type if you override it. Fixes #14197, #14238 This partially reverts commit 3047376870d4a7adc7ff15c3cb4852e073c8f1da. | ||||
* | Add `#no_content_type` attribute to `AD::Response` | Prem Sichanugrist | 2014-02-18 | 1 | -6/+4 |
| | | | | | Setting this attribute to `true` will remove the content type header from the request. This is use in `render :body` feature. | ||||
* | Cleanup `ActionController::Rendering` | Prem Sichanugrist | 2014-02-18 | 1 | -11/+27 |
| | |||||
* | Introduce `render :html` for render HTML string | Prem Sichanugrist | 2014-02-18 | 1 | -2/+2 |
| | | | | | | | | | This is an option for to HTML content with a content type of `text/html`. This rendering option calls `ERB::Util.html_escape` internally to escape unsafe HTML string, so you will have to mark your string as html safe if you have any HTML tag in it. Please see #12374 for more detail. | ||||
* | Introduce `render :plain` for render plain text | Prem Sichanugrist | 2014-02-18 | 1 | -2/+10 |
| | | | | | | | | This is as an option to render content with a content type of `text/plain`. This is the preferred option if you are planning to render a plain text content. Please see #12374 for more detail. | ||||
* | Introduce `render :body` for render raw content | Prem Sichanugrist | 2014-02-18 | 1 | -4/+13 |
| | | | | | | | | | | | | This is an option for sending a raw content back to browser. Note that this rendering option will unset the default content type and does not include "Content-Type" header back in the response. You should only use this option if you are expecting the "Content-Type" header to not be set. More information on "Content-Type" header can be found on RFC 2616, section 7.2.1. Please see #12374 for more detail. | ||||
* | #presence used | Akshay Vishnoi | 2013-11-14 | 1 | -5/+1 |
| | |||||
* | Remove remaining coupling with AV in MimeResponds | José Valim | 2013-09-09 | 1 | -2/+5 |
| | |||||
* | Remove BasicRendering and remove template functionality from AbsC::Rendering | José Valim | 2013-09-09 | 1 | -2/+6 |
| | |||||
* | render_to_string shouldn't play with response_body | Santiago Pastorino | 2013-09-04 | 1 | -4/+5 |
| | |||||
* | Move BasicRendering to AbstractController | Łukasz Strzałkowski | 2013-09-03 | 1 | -28/+0 |
| | |||||
* | Make Mime::TEXT default format in AbstractController | Łukasz Strzałkowski | 2013-09-03 | 1 | -4/+0 |
| | |||||
* | Fix formatting of error message | Łukasz Strzałkowski | 2013-08-25 | 1 | -2/+1 |
| | | | | Make it oneliner | ||||
* | Change description of BasicRendering#render | Łukasz Strzałkowski | 2013-08-25 | 1 | -1/+1 |
| | | | | | | We're not dealing with templates here [ci skip] | ||||
* | Simplify if statements | Łukasz Strzałkowski | 2013-08-25 | 1 | -6/+4 |
| | |||||
* | Describe BasicRendering shortly | Łukasz Strzałkowski | 2013-08-25 | 1 | -0/+4 |
| | | | | [ci skip] | ||||
* | Extend basic rendering, test it in railties | Łukasz Strzałkowski | 2013-08-25 | 1 | -3/+16 |
| | |||||
* | Fist stab on basic rendering | Łukasz Strzałkowski | 2013-08-25 | 1 | -0/+18 |
| | |||||
* | Add #rendered_format method to controllers | Łukasz Strzałkowski | 2013-08-25 | 1 | -4/+4 |
| | |||||
* | Revert "Move setting content_type to AV" | Łukasz Strzałkowski | 2013-08-25 | 1 | -0/+1 |
| | | | | This reverts commit f4d602aff6cec80304b131ecfcc2676d0304f0cc. | ||||
* | Move setting content_type to AV | Łukasz Strzałkowski | 2013-08-25 | 1 | -1/+0 |
| | |||||
* | Hook up AV::Rendering on AV intialization | Łukasz Strzałkowski | 2013-08-25 | 1 | -2/+0 |
| | |||||
* | Move rendering from AP to AV | Łukasz Strzałkowski | 2013-08-25 | 1 | -1/+1 |
| | |||||
* | Return nil for Mime::NullType#ref | Andrew White | 2013-04-10 | 1 | -1/+1 |
| | |||||
* | Reverts rendering behavior when format is unknown | Grzegorz Świrski | 2013-04-10 | 1 | -1/+1 |
| | | | | | | | | | If a request has unknown format (eg. /foo.bar), the renderer fallbacks to default format. This patch reverts Rails 3.2 behavior after c2267db commit. Fixes issue #9654. | ||||
* | format lookup for partials is derived from the format in which the template ↵ | Santiago Pastorino | 2012-02-22 | 1 | -1/+1 |
| | | | | | | is being rendered Closes #5025 part 2 | ||||
* | Move render_to_body logic to return a spaced string to AC::Rendering | Carlos Antonio da Silva | 2012-01-17 | 1 | -0/+4 |
| | | | | | | | | | | | This seems to be required only when calling render :partial with an empty collection from a controller. This call happens to return no content, letting the response body empty, which means to Rails that it should go on and try to find a template to render based on the current action name, thus failing hard. Although tests keep all green, we need to check a better way to fix this. | ||||
* | Refactor render nothing/text => nil logic, and move to right place | Carlos Antonio da Silva | 2012-01-17 | 1 | -0/+4 |
| | | | | | Options :nothing and :text => nil should be handled by ActionController::Rendering instead. | ||||
* | Do not inherit from Rack::Response, remove a shit-ton of unused code. | José Valim | 2011-04-19 | 1 | -0/+11 |
| | |||||
* | Use Mime::Type references. | José Valim | 2011-02-08 | 1 | -1/+1 |
| | |||||
* | Fix indentation | Santiago Pastorino | 2010-11-20 | 1 | -24/+23 |
| | |||||
* | Rendering doesn't need RackDelegation | wycats | 2010-10-10 | 1 | -1/+0 |
| | |||||
* | Ensure controller filters are executed before stuff starts to happen. | José Valim | 2010-03-13 | 1 | -1/+1 |
| | |||||
* | Finish cleaning up rendering stack from views and move assigns evaluation to ↵ | José Valim | 2010-03-12 | 1 | -10/+11 |
| | | | | controller (so plugins and/or controllers can overwrite just one method). | ||||
* | Finally moved the find template logic to the views. | José Valim | 2010-03-08 | 1 | -29/+12 |
| | |||||
* | More refactoring. Split _normalize_args and _normalize_options concerns. | José Valim | 2010-03-08 | 1 | -6/+13 |
| | |||||
* | Move layout lookup to views. | José Valim | 2010-03-08 | 1 | -1/+1 |
| | |||||
* | Added template lookup responsible to hold all information used in template ↵ | José Valim | 2010-03-07 | 1 | -1/+0 |
| | | | | lookup. | ||||
* | Merge _details_defaults and details_for_render | Carlhuda | 2010-03-01 | 1 | -4/+0 |
| | |||||
* | Change AV formats so they can delegate to the controller. Now users (or ↵ | Carlhuda | 2010-03-01 | 1 | -1/+5 |
| | | | | plugins) can override details_for_render in their controllers and add appropriate additional details. Now if only they could *do* something with those details... | ||||
* | Renamed LocalizedCache to DetailsCache. | José Valim | 2010-02-24 | 1 | -1/+1 |
| | |||||
* | Cleanup render callstack and make render(:json => {}, :status => 401) work ↵ | José Valim | 2010-02-24 | 1 | -23/+14 |
| | | | | again. |