aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/layouts_and_rendering.md
Commit message (Collapse)AuthorAgeFilesLines
* Update guide for the counter variable when rendering with the `as:` optionLucas Oliveira2018-10-161-1/+1
| | | | [ci skip]
* Rails guides are now served over httpsPaul McMahon2018-07-241-1/+1
| | | | | http links will be redirected to the https version, but still better to just directly link to the https version.
* Capitalize class name 'Product'.Yong Bakos2018-06-011-1/+1
| | | | | In this context, the phrase 'product instance' refers to the Product class, so capitalize it.
* Added a lot of Oxford commasAnthony Crumley2018-05-101-2/+2
| | | | | | | [ci skip] A regular expression was used to find a lot of missing Oxford commas and add them. The regular expression was as follows. ", ([a-zA-Z0-9.\`:'\"]+ ){1,6}(or|and) "
* Update "Layouts and Rendering in Rails" guide [ci skip]bogdanvlviv2018-01-171-1/+1
| | | | | | | | | - Remove mention about `ActionView::TemplateHandlers` since this module was removed by c1304098cca8a9247a9ad1461a1a343354650843. Change word `subclasses` to `nested classes`. See c7408a0e40545558872efb4129fe4bf097c9ce2f - Remove useless sentence "Beginning with Rails 2, the standard extensions are `.erb` for ERB (HTML with embedded Ruby), and `.builder` for Builder (XML generator)."
* Correct render method's response header's content type for option(:body) ↵Avneet Singh Malhotra2017-11-241-1/+1
| | | | from text/html to text/plain. (#31212)
* Update layouts_and_rendering.md [ci skip]Rob2017-11-141-1/+1
|
* Encourage html-safe API in layouts/rendering guideNeil Matatall2017-09-271-2/+2
| | | | | | | While the code example was not unsafe, it encourages the use of confusingly unsafe APIs (specifically `html_safe`). We have a safe alternative and we should encourage people to use it under all circumstances.
* Update Layouts and Rendering in Rails [ci skip]Yoshiyuki Hirano2017-09-171-17/+19
| | | | | | | | | * The example code on this page are similar to ones generated by scaffold generator, but some points are different. * Of course, it is no reason to be as same as scaffolding codes. But this is the guide for beginners, I thought it's better to be almost same as scaffolding codes.
* Add missing http status codes [ci skip]yuuji.yaginuma2017-07-041-0/+2
| | | | | Ref: https://github.com/rack/rack/commit/5401f776f660b1f8d0e0650ba78478d7488eff75, https://github.com/rack/rack/commit/73e08279d4433ca66cf22157a40dba562629031a
* Specify correct extension for text layoutsJorge Dias2017-06-291-1/+1
| | | When using render plain the extension for the layout needs to be .text.erb instead of .txt.erb
* Guides: Clarify partial local variable naming.Yong Bakos2017-06-231-1/+1
| | | | | Clarify the partial local variable name as being the same as the name of the partial, minus the _leading_ underscore.
* Add :json type to auto_discovery_link_tagMike Gunderloy2017-05-201-1/+1
| | | | | This allows auto_discovery_link_tag to support the JSON Feed standard. See https://jsonfeed.org/version/1 for more information.
* [ci skip] Fully qualify missing template error.Kasper Timm Hansen2017-02-111-1/+1
| | | | Switch extension 👉 format as it's more apt here.
* Add information on `:formats` option in action_view_overview.mdkenta-s2017-02-061-0/+2
|
* Fix typo in guide: _articles should be _articleMatthew Eagar2017-02-031-1/+1
| | | | | | | The guide contains a typo in the "local_assigns" section, where rendering a model named 'Article' via `render @articles` is shown to render a partial called `_articles.html.erb`, when in fact the necessary partial name is `_article.html.erb`
* Fix small typo in Layouts and Rendering guide. [ci skip]Conrad Beach2016-11-141-1/+1
| | | Changed "same way they do" to "same way they are".
* Use local variable instead of instance variable [ci skip]Daniel Amireh2016-11-051-1/+1
| | | Update render yield docs to use `search` local variable instead of `@q` instance variable
* Merge branch 'master' of github.com:rails/docrailsVijay Dev2016-09-201-0/+2
|\
| * :nail_care: [ci skip]Prathamesh Sonpatki2016-09-071-1/+1
| |
| * Document that redirect* don't halt exucution. We explain more on this ↵Vipul A M2016-09-061-0/+2
| | | | | | | | behavior in 2.3.2, but dont specify that is not halting. Its better to not let developers be caught by surprise. [ci skip]
* | [ci skip] Fixed commas according to Oxford comma in rdoc and guidesAndrey Molchanov2016-09-171-1/+1
|/
* Update the rendering guide to match the current behaviorRafael Mendonça França2016-03-051-10/+9
| | | | | | | | In the latest security releases render with a trailing slash no more call render :file. Also add a note about the security implications of using it with user parameters.
* Change 'a HTTP' to 'an HTTP' [ci skip]Santosh Wadghule2016-03-031-1/+1
|
* Fix grammar `a` to `an` [ci skip]Ryuta Kamizono2016-02-131-1/+1
|
* remove description of `render :nothing` from guide [ci skip]yuuji.yaginuma2016-02-091-1/+1
| | | | `:nothing` option was deprecated in 44781b6e9790d90b4f8b9a41d2b2c114b1a582ee
* Make text about render :html option clearer to state, text will get escaped ↵Vipul A M2016-01-191-1/+1
| | | | | | | if not marked as safe by using html_safe Fixes #22648 [ci skip]
* remove content_tag_for exampleRyo Hashimoto2015-12-221-7/+5
|
* Deprecate `redirect_to :back`Derek Prior2015-12-161-9/+4
| | | | | | | Applications that use `redirect_to :back` can be forced to 500 by clients that do not send the HTTP `Referer` (sic) header. `redirect_back` requires the user to consider this possibility up front and avoids this trivially-caused application error.
* Add `redirect_back` for safer referrer redirectsDerek Prior2015-12-161-0/+8
| | | | | | | | | | | | | | | | | `redirect_to :back` is a somewhat common pattern in Rails apps, but it is not completely safe. There are a number of circumstances where HTTP referrer information is not available on the request. This happens often with bot traffic and occasionally to user traffic depending on browser security settings. When there is no referrer available on the request, `redirect_to :back` will raise `ActionController::RedirectBackError`, usually resulting in an application error. `redirect_back` takes a required `fallback_location` keyword argument that specifies the redirect when the referrer information is not available. This prevents 500 errors caused by `ActionController::RedirectBackError`.
* Fix typo in docs [ci skip]Scott González2015-10-071-1/+1
|
* Add a missing period to layouts_and_rendering.md [ci skip]Juanito Fatas2015-09-241-1/+1
|
* Rack changed their status codes to IETF RFC 7231Benjamin Quorning2015-08-211-4/+3
| | | | rack/rack#754
* Deprecate `:nothing` option for render methodMehmet Emin İNAÇ2015-05-281-26/+0
| | | | `head` method works similar to `render` method with `:nothing` option
* Fix typos and improve the documentationJon Atack2015-04-151-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a squash of the following commits, from first to last: - Fix minor, random things I’ve come across lately that individually did not seem worth making a PR for, so I saved them for one commit. One common error is using “it’s” (which is an abbreviation of “it is”) when the possessive “its” should be used for indicating possession. - Changes include the name of a test, so remove the `[skip ci]` (thanks @senny). - Line wrap the changes at 80 chars and add one more doc fix. - Add a missing line wrap in the Contributing to Ruby on Rails Guide. - Line wrap the `TIP` section in the Contributing to Ruby on Rails Guide as well. Rendering the guide locally with `bundle exec rake guides:generate` did not show any change in on-screen formatting after adding the line wrap. The HTML generated is (extra line added to illustrate where the line wrap takes place): <div class="info"><p>Please squash your commits into a single commit when appropriate. This simplifies future cherry picks and also keeps the git log clean.</p></div> - Squash commits.
* [ci skip] Remove unnecessary linesyui-knk2015-04-011-2/+0
|
* Some documentation edits [ci skip]Robin Dupret2015-03-051-2/+3
| | | | | | * Fix a few typos * Wrap some lines around 80 chars * Rephrase some statements
* fix spelling, `ERb` -> `ERB` [ci skip]yuuji.yaginuma2015-03-041-1/+1
|
* Fix wording in template inheritance section of layout guide [ci skip]Prathamesh Sonpatki2015-02-271-1/+1
|
* Merge pull request #16738 from net-engine/guides-template-inheritanceRafael Mendonça França2015-02-251-0/+36
|\ | | | | Guides: Template Inheritance (new in guides, feature in since 3.1)
| * Merge remote-tracking branch 'origin/master' into guides-template-inheritanceecoologic2014-10-071-1/+2
| |\
| * | 2.2.14.5 Template Inheritance (new in guide, feature in since 3.1)erik2014-08-291-0/+36
| | |
* | | Merge pull request #15700 from maurogeorge/guides-local_assignsRafael Mendonça França2015-02-181-0/+30
|\ \ \ | | | | | | | | | | | | Add docs about local_assigns on guides
| * | | Add docs about local_assigns on guidesMauro George2014-06-131-0/+30
| | | | | | | | | | | | | | | | [ci skip]
* | | | fix syntax error in render partial example [ci skip]yuuji.yaginuma2015-02-151-2/+2
| | | |
* | | | Add :formats to options list of render documentation.Diogo Benicá2015-01-211-1/+11
| | | |
* | | | Merge pull request #18503 from vipulnsward/guides-in-onXavier Noria2015-01-141-1/+1
|\ \ \ \ | | | | | | | | | | Changed `IN` to `ON` in markdown renderer condition
| * | | | - Changed `IN` to `ON` in markdown renderer conditionVipul A M2015-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | - Changed `IN` to `ON` in all note sentences in guides.
* | | | | Change a to an for HTML word [ci skip]Santosh Wadghule2015-01-131-1/+1
|/ / / /
* | | | Merge pull request #17974 from killthekitten/fix-render-blockRafael Mendonça França2015-01-021-0/+36
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make possible to use blocks with short version of render partial Conflicts: actionview/CHANGELOG.md