aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/renderer
Commit message (Collapse)AuthorAgeFilesLines
* Pass formats to lookup_contextRafael Mendonça França2015-08-241-1/+1
| | | | | | | | Before we were changing the state of the lookup_context for the duration of the with_layout_format block, but since we already know the formats we can just pass it explicitly. Related with 8d7ce0f22aee09d20091a4dc58cb379a09d13e26
* remove useless case in #resolve_layout.Nick Sutterer2015-08-241-2/+0
|
* remove LookupContext#with_layout_format by passing formats for layouts ↵Nick Sutterer2015-08-242-8/+11
| | | | explicitely.
* zOMG 37 objects savedschneems2015-07-301-1/+1
|
* Fix cache issue when different partials use the same collectionRoque Pinel2015-06-281-1/+1
| | | | | | | | | Adds the `virtual_path` option to `cache_fragment_name` so it can be provided when needed. That allows `cache_collection_render` to get the appropriate cache key with the digest generated based on the template and prevent collision with other templates that cache the same collection.
* Remove duplicate private statementRoque Pinel2015-06-211-2/+0
|
* spelling fix [ci skip]karanarora2015-05-191-1/+1
|
* Do not put partial name to local_assigns when rendering without an objectHenrik Nygren2015-05-141-1/+1
| | | | | | | | When one rendered a partial template without specifying an object or a collection (e.g. <%= render partial: 'partial_name' %>), Rails would make an object called :partial_name available in local_assigns. I don't think this was the intended behavior, since no local variable called 'partial_name' gets defined in the view.
* Merge pull request #19535 from JuanitoFatas/doc/av-commentYves Senn2015-03-271-1/+1
|\ | | | | [ci skip] Unify the code comment in ActionView::Renderer#render_template...
| * [ci skip] Unify the code comment in ActionView::Renderer#render_template.Juanito Fatas2015-03-271-1/+1
| |
* | Add missing :html option in determine_template error message.Juanito Fatas2015-03-271-1/+1
|/
* [ci skip] Fix `&>` with `%>`yui-knk2015-03-251-9/+9
|
* Collections automatically cache and fetch partials.Kasper Timm Hansen2015-02-211-2/+15
| | | | | | | | | | | | | | | | | | | | | | | Collections can take advantage of `multi_read` if they render one template and their partials begin with a cache call. The cache call must correspond to either what the collections elements are rendered as, or match the inferred name of the partial. So with a notifications/_notification.html.erb template like: ```ruby <% cache notification %> <%# ... %> <% end %> ``` A collection would be able to use `multi_read` if rendered like: ```ruby <%= render @notifications %> <%= render partial: 'notifications/notification', collection: @notifications, as: :notification %> ```
* Merge multi_fetch_fragments.Kasper Timm Hansen2015-02-202-2/+63
| | | | | | | | Makes caching a collection of template partials faster using `read_multi` on the Rails cache store. Some caching implementations have optimized `read_multi` so we don't have to check in the cache store for every template.
* Partial template name does no more have to be a valid Ruby identifierAkira Matsuda2015-02-061-3/+2
| | | | because the partial renderer would not create an lvar per each template since c67005f221f102fe2caca231027d9b11cf630484
* Merge branch 'master' of github.com:rails/docrailsVijay Dev2015-01-031-5/+5
|\
| * Fix "Rendering" not to link to AV::Renderingclaudiob2014-12-251-5/+5
| | | | | | | | | | | | | | The "Rendering" word in the titles is not meant to be a link to the documentation for ActionView::Rendering. [ci skip]
* | fix error message of option as with invalid charters in partial renderingAngelo capilleri2014-12-291-2/+10
|/ | | | | before this PR IDENTIFIER_ERROR_MESSAGE could lead to misunderstand the convention of partial name. Added OPTION_AS_ERROR_MESSAGE for unvalid charter in as option.
* Fix warning in AV testsSean Griffin2014-11-251-2/+4
| | | | Originally caused by #17771
* Local vars should exist in partials for falsy `:object:` values tooAgis-2014-11-251-2/+2
| | | | | | | | | | | | c67005f221f102fe2caca231027d9b11cf630484 made the local var in partials available only if what passed to `:object` was truthy. For example this would not make the local variable `foo` available inside the partial: render partial: 'foo', object: false Fixes #17373.
* Avoid creating unneeded Hash instance and calling slow Hash#fetchAkira Matsuda2014-10-251-1/+1
|
* marking private methods which dont work if called on their own anywaysEugene Gilburg2014-07-182-1/+5
|
* small refactors to actionview renderersEugene Gilburg2014-07-183-16/+15
|
* Fix typo on the variable nameRafael Mendonça França2014-07-161-8/+8
|
* Document the PartialIteration objectRafael Mendonça França2014-07-161-3/+9
|
* Build only one PartialIteration object for loopRafael Mendonça França2014-07-161-11/+18
|
* No need to have a file to PartialIteration classRafael Mendonça França2014-07-161-1/+17
| | | | This class is only used on the PartialRenderer.
* Added PartialIteration class used when rendering collectionsJoel Junström2014-07-161-13/+28
| | | | | | | | | | | | The iteration object is available as the local variable "template_name_iteration" when rendering partials with collections. It gives access to the +size+ of the collection beeing iterated over, the current +index+ and two convinicence methods +first?+ and +last?+ "template_name_counter" variable is kept but is deprecated. [Joel Junström + Lucas Uyezu]
* Introduce `render :html` for render HTML stringPrem Sichanugrist2014-02-181-0/+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 textPrem Sichanugrist2014-02-181-1/+3
| | | | | | | | 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 contentPrem Sichanugrist2014-02-181-2/+4
| | | | | | | | | | | | 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.
* typos rectified [ci skip]Aayush khandelwal2013-12-121-1/+1
|
* Improve readability of sentence in partial-renderer docs [ci skip]Mac Martine2013-11-191-1/+1
|
* Fix default rendered format problem when calling render method without ↵kennyj2013-07-151-1/+1
| | | | :content_type option. Closes #11393.
* Move actionpack/lib/action_view* into actionview/libPiotr Sarnacki2013-06-205-0/+788