diff options
author | Jonathan Roes <jroes@jroes.net> | 2013-04-04 14:14:48 -0300 |
---|---|---|
committer | Jonathan Roes <jroes@jroes.net> | 2013-04-04 14:14:48 -0300 |
commit | 567ea4ba29074079a05ba327c2d78e4a68eb3882 (patch) | |
tree | 663aebad1248f2a23d58e89156efde7d569d947a /guides/source | |
parent | c918298c8e5096b58dfcfbeb2a8a90c17ab4df3e (diff) | |
download | rails-567ea4ba29074079a05ba327c2d78e4a68eb3882.tar.gz rails-567ea4ba29074079a05ba327c2d78e4a68eb3882.tar.bz2 rails-567ea4ba29074079a05ba327c2d78e4a68eb3882.zip |
Basic Layouts overview w/ link to guide
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/action_view_overview.md | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/guides/source/action_view_overview.md b/guides/source/action_view_overview.md index 3b5963efc2..dea1ddef71 100644 --- a/guides/source/action_view_overview.md +++ b/guides/source/action_view_overview.md @@ -172,7 +172,7 @@ That code will pull in the partial from `app/views/shared/_menu.html.erb`. #### Using Partials to simplify Views -One way to use partials is to treat them as the equivalent of subroutines: as a way to move details out of a view so that you can grasp what's going on more easily. For example, you might have a view that looked like this: +One way to use partials is to treat them as the equivalent of subroutines; a way to move details out of a view so that you can grasp what's going on more easily. For example, you might have a view that looks like this: ```html+erb <%= render "shared/ad_banner" %> @@ -269,12 +269,7 @@ Rails will render the `_product_ruler` partial (with no data passed to it) betwe ### Layouts -TODO... - -Using Templates, Partials and Layouts "The Rails Way" --------------------------------------------------------- - -TODO... +Layouts can be used to render a common view template around the results of Rails controller actions. Typically, every Rails has a couple of overall layouts that most pages are rendered within. For example, a site might have a layout for a logged in user, and a layout for the marketing or sales side of the site. The logged in user layout might include top-level navigation that should be present across many controller actions. The sales layout for a SaaS app might include top-level navigation for things like "Pricing" and "Contact Us." You would expect each layout to have a different look and feel. You can read more details about Layouts in the [Layouts and Rendering in Rails](layouts_and_rendering.html) guide. Partial Layouts --------------- |