SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: Render more than once?
Hybrid View
-
Nov 21, 2005, 23:22 #1
- Join Date
- Jun 2004
- Location
- California
- Posts
- 440
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Render more than once?
I am working on a CMS and there is some ERB code in the database. When this is pulled, it is rendered. It then uses helpers to pull other content. Some of this content also contains erb code.
Is there any way to continue parsing this erb code without getting the blasted "no more than one render per view" or something like that?
-
Nov 21, 2005, 23:35 #2
- Join Date
- Nov 2004
- Location
- Yakima WA.
- Posts
- 100
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Look into:
render :inline => @mytemplate_stored_in_the_db
-
Nov 21, 2005, 23:37 #3
- Join Date
- Jun 2004
- Location
- California
- Posts
- 440
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I do use render :inline... I still get the rendering more than once error.
-
Nov 25, 2005, 07:38 #4
- Join Date
- Jul 2004
- Location
- Gerodieville Central, UK
- Posts
- 446
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Once you've called a render, or redirect, it's recommended that you use an explict return to ensure no other render / redirect calls are made
-
Nov 25, 2005, 08:23 #5
- Join Date
- Jun 2004
- Location
- California
- Posts
- 440
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yes well I've solved my problem using inline renders and render_to_string
Bookmarks