Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

A slight README.markdown augmentation for Views #270

Closed
wants to merge 1 commit into from

1 participant

@rgarner

From a reply given at http://groups.google.com/group/rspec/browse_thread/thread/99e93540abeedcc4 which took me quite a while to find ;)

@rgarner

Explicit template/layout render example

@amatsuda amatsuda referenced this pull request from a commit
@rgarner rgarner Explicit template/layout render example
- Closes #270.
30d998c
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 25, 2010
  1. @rgarner
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 0 deletions.
  1. +5 −0 README.markdown
View
5 README.markdown
@@ -187,6 +187,11 @@ This means that most of the time you don't need to set these values. When
spec'ing a partial that is included across different controllers, you _may_
need to override these values before rendering the view.
+To provide a layout for the render, you'll need to specify _both_ the template
+and the layout explicitly. For example:
+
+ render :template => "events/show", :layout => "layouts/application"
+
## `assign(key, val)`
Use this to assign values to instance variables in the view:
Something went wrong with that request. Please try again.