How do I render a view within another view... in rails... is it possible?
+1
A:
Use view partials
See section 3.4 http://guides.rubyonrails.org/layouts_and_rendering.html
Larry K
2010-08-03 19:30:18
thanks that worked!
Madhusudhan
2010-08-03 19:45:17
+2
A:
A complete view inside another a view? Normally the way you would handle something like this in rails would be with partials.
Create a set of shared partials, and then just render them in each of the views.
Doon
2010-08-03 19:30:46
+2
A:
#hotdog_controller
def show
# by default renders template hotdog/show.html.erb
end
#hotdog/show.html.erb
<%= render :template => 'ketchup' -%>
mark
2010-08-03 19:30:49
A:
I do the same thing a few times, but I load the sub views in through AJAX. And that AJAX is instantiated within the partial.
Trip
2010-08-03 19:45:08