1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

14 commits

Author SHA1 Message Date
Eugene Gilburg
348de3a06e marking private methods which dont work if called on their own anyways 2014-07-18 20:54:30 -07:00
Eugene Gilburg
38117adfe3 small refactors to actionview renderers 2014-07-18 20:54:03 -07:00
Rafael Mendonça França
d4df7ce7b3 Fix typo on the variable name 2014-07-16 14:59:55 -03:00
Rafael Mendonça França
7dc0f3fc8d Document the PartialIteration object 2014-07-16 14:54:23 -03:00
Rafael Mendonça França
9290fc5ce2 Build only one PartialIteration object for loop 2014-07-16 14:54:22 -03:00
Rafael Mendonça França
9830ebbeaf No need to have a file to PartialIteration class
This class is only used on the PartialRenderer.
2014-07-16 14:50:51 -03:00
Joel Junström
1f5b360466 Added PartialIteration class used when rendering collections
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]
2014-07-16 14:50:51 -03:00
Prem Sichanugrist
920f3ba266 Introduce render :html for render HTML string
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.
2014-02-18 12:08:36 -05:00
Prem Sichanugrist
8cd9f6d205 Introduce render :plain for render plain text
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.
2014-02-18 12:08:36 -05:00
Prem Sichanugrist
103e18c87d Introduce render :body for render raw content
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.
2014-02-18 12:08:36 -05:00
Aayush khandelwal
4a9e54ef35 typos rectified [ci skip] 2013-12-12 11:29:23 +05:30
Mac Martine
6251eb992f Improve readability of sentence in partial-renderer docs [ci skip] 2013-11-19 15:46:00 -08:00
kennyj
ca85caca0d Fix default rendered format problem when calling render method without :content_type option. Closes #11393. 2013-07-15 02:11:43 +09:00
Piotr Sarnacki
0d6e8edc2a Move actionpack/lib/action_view* into actionview/lib 2013-06-20 17:23:15 +02:00