2010/8/3 Nestor Rodriguez <[email protected]>:
> Que tal amigos de RoR, estoy mareándome con esto de los render, según lo que
> lei el render lo que hace es llamar a diferentes view, es decir a diferentes
> html.erb segun se le indique.
>
> Aqui tengo la accion que llama al index (segun entiendo no al controlador
> sino a su vista)
> def entradas_general
> @entradas = Entrada.paginate :page => params[:page], :per_page =>
> 10,:order=>"fecha_hora desc"
>
> respond_to do |format|
> render :template => "entradas/index.html.erb" <<================
> format.xml { render :xml => @entradas }
> end
> end
>
> Sin embargo me devuelve un error.
>
respond_to do |format|
format.html { render :template => 'entradas/index' }
format.xml { ... }
end
http://apidock.com/rails/ActionController/Base/render
"Rendering a template"
# Renders the template located in
[TEMPLATE_ROOT]/weblog/show.r(html|xml) (in Rails,
app/views/weblog/show.erb)
render :template => "weblog/show"
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
_______________________________________________
Ruby mailing list
[email protected]
http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar