Commit Graph

86 Commits

Author SHA1 Message Date
Vipul A M
b4dac34508
Document that redirect* don't halt exucution. We explain more on this behavior in 2.3.2, but dont specify that is not halting. Its better to not let developers be caught by surprise. [ci skip] 2016-09-06 23:45:34 +05:30
Rafael Mendonça França
403c57aec0 Update the rendering guide to match the current behavior
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.
2016-03-05 20:07:27 -03:00
Santosh Wadghule
ea36c579c6 Change 'a HTTP' to 'an HTTP' [ci skip] 2016-03-03 20:28:01 +05:30
Ryuta Kamizono
1335959135 Fix grammar a to an [ci skip] 2016-02-13 20:44:44 +09:00
yuuji.yaginuma
9e70daa941 remove description of render :nothing from guide [ci skip]
`:nothing` option was deprecated in 44781b6e9790d90b4f8b9a41d2b2c114b1a582ee
2016-02-09 14:38:50 +09:00
Vipul A M
0764e67863 Make text about render :html option clearer to state, text will get escaped if not marked as safe by using html_safe
Fixes #22648
[ci skip]
2016-01-19 15:15:25 +05:30
Ryo Hashimoto
4f5536068d remove content_tag_for example 2015-12-22 14:51:05 +09:00
Derek Prior
dc4429ca3b
Deprecate redirect_to :back
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.
2015-12-16 11:42:25 -05:00
Derek Prior
13fd5586ce
Add redirect_back for safer referrer redirects
`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`.
2015-12-16 11:42:05 -05:00
Scott González
ab62af7c93 Fix typo in docs [ci skip] 2015-10-07 10:27:46 -04:00
Juanito Fatas
cb45950c27 Add a missing period to layouts_and_rendering.md [ci skip] 2015-09-24 14:28:56 +08:00
Benjamin Quorning
4bcab1cdb8 Rack changed their status codes to IETF RFC 7231
rack/rack#754
2015-08-21 09:04:50 +02:00
Mehmet Emin İNAÇ
44781b6e97 Deprecate :nothing option for render method
`head` method works similar to `render` method with `:nothing` option
2015-05-28 15:13:32 +03:00
Jon Atack
6345f31fbf Fix typos and improve the documentation
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.
2015-04-15 16:25:24 +05:30
yui-knk
0f26977d09 [ci skip] Remove unnecessary lines 2015-04-01 20:02:56 +09:00
Robin Dupret
d969405acd Some documentation edits [ci skip]
* Fix a few typos
* Wrap some lines around 80 chars
* Rephrase some statements
2015-03-05 14:18:09 +01:00
yuuji.yaginuma
2449258dc4 fix spelling, ERb -> ERB [ci skip] 2015-03-04 13:37:53 +09:00
Prathamesh Sonpatki
7019b19615 Fix wording in template inheritance section of layout guide [ci skip] 2015-02-27 10:55:10 +05:30
Rafael Mendonça França
89e051ace3 Merge pull request #16738 from net-engine/guides-template-inheritance
Guides: Template Inheritance (new in guides, feature in since 3.1)
2015-02-25 20:34:05 -03:00
Rafael Mendonça França
e07eb079bf Merge pull request #15700 from maurogeorge/guides-local_assigns
Add docs about local_assigns on guides
2015-02-18 17:34:37 -02:00
yuuji.yaginuma
cf7b677def fix syntax error in render partial example [ci skip] 2015-02-15 19:55:24 +09:00
Diogo Benicá
8b18449c27 Add :formats to options list of render documentation. 2015-01-21 23:52:44 -02:00
Xavier Noria
7ba24831d7 Merge pull request #18503 from vipulnsward/guides-in-on
Changed `IN` to `ON` in markdown renderer condition
2015-01-14 11:35:34 +01:00
Vipul A M
5cfaf5a46e - Changed IN to ON in markdown renderer condition
- Changed `IN` to `ON` in all note sentences in guides.
2015-01-14 11:52:13 +05:30
Santosh Wadghule
f5fced2bb9 Change a to an for HTML word [ci skip] 2015-01-13 11:20:34 +05:30
Rafael Mendonça França
873870df4c Merge pull request #17974 from killthekitten/fix-render-block
Make possible to use blocks with short version of render partial

Conflicts:
	actionview/CHANGELOG.md
2015-01-02 14:12:23 -03:00
Xavier Noria
7702974281 warn about reading guides in GitHub
References #18148.
2014-12-23 23:32:50 +01:00
J Connolly
2ad466b867 Describe gotcha for 'status' option [ci skip] 2014-12-22 19:04:57 -08:00
Nikolay Shebanov
f02a35b86e Make possible to use blocks with short version of render partial 2014-12-19 13:52:12 +01:00
Anton Cherepanov
bb0d6389e5 [ci skip] Fix output of video_tag helper 2014-12-07 22:11:19 +03:00
ecoologic
117f09c5d1 Merge remote-tracking branch 'origin/master' into guides-template-inheritance 2014-10-07 23:17:56 +10:00
yuktikhurana
67a605d3d4 In render file, by default the current layout is rendered always 2014-10-01 11:03:49 +05:30
Zachary Scott
eb8aa4d9fb Clean up grammar from #16752 [ci skip] 2014-08-30 19:44:53 -07:00
shruti2791
64c2215cbb [ci skip] add line about text layout 2014-08-30 20:17:30 +05:30
erik
8caf16a281 2.2.14.5 Template Inheritance (new in guide, feature in since 3.1) 2014-08-29 16:07:56 +10:00
Vijay Dev
41231ef6c6 Merge branch 'master' of github.com:rails/docrails
Conflicts:
	actionpack/lib/action_controller/metal/mime_responds.rb
	actionview/lib/action_view/vendor/html-scanner/html/sanitizer.rb
	activerecord/lib/active_record/type/value.rb
2014-08-19 16:28:53 +00:00
yuuji.yaginuma
2ba1670f37 [ci skip] Fix sample code in Layouts and Rendering guide 2014-08-17 22:42:03 +09:00
Hendy Tanata
71c7fd1013 Uppercase HTML in docs.
[skip ci]
2014-08-08 14:27:05 -07:00
Anton Cherepanov
e2960fb293 Small typo 2014-06-23 23:15:58 +06:00
Mauro George
24bcfed15d Add docs about local_assigns on guides
[ci skip]
2014-06-13 19:01:29 -03:00
John Kelly Ferguson
d02c810e29 Rename Posts to Articles in Guides, continuation of 2d446e77 / #13774 [ci skip] 2014-05-21 23:01:45 -04:00
Prem Sichanugrist
ed88a601f7
Do note remove Content-Type when render :body
`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.
2014-03-05 10:33:52 -05:00
Prem Sichanugrist
76be30fe40 Update guides for new rendering options
* Introduces `:plain`, `:html`, `:body` render option.
* Update guide to use `render :plain` instead of `render :text`.
2014-02-18 12:11:41 -05:00
Vijay Dev
72e11abeaf Simplify doc [ci skip]
The `as` option was already explained in a previous example
and doesn't need to be repeated. Explain only the `locals` option
which the example is meant for.
2014-02-09 23:58:09 +05:30
Vijay Dev
ccd908f9ce Merge pull request #13630 from seapy/master
Fixed typo [ci skip]
2014-02-09 23:51:46 +05:30
leriksen
951bb848be [ci skip] - error_messages_for has been deprecated since 2.3.8 - lets reduce any confusion for users 2014-01-10 12:08:17 +11:00
seapy
6c252b5cb9 Fixed typo [ci skip]
singular is more suited to
2014-01-08 21:57:25 +09:00
Kuldeep Aggarwal
e10f91000b Improved documents [ci skip] 2013-12-14 22:49:00 +05:30
Akshay Vishnoi
ef0f633c66 Typo and grammatical fixes [ci skip] 2013-12-02 19:35:02 +05:30
Juanito Fatas
825e350faa [ci skip] Fix curl response output and use strong parameters in update action. 2013-11-13 02:33:04 +08:00