Hi there, i have a question respect to the "render"
when use render in the controller
def create
@contacto = Contacto.new(params[:contacto])
respond_to do |format|
if @contacto.save
flash[:notice] = 'Su Consulta ha sido enviada'
crear_correo(@contacto)
format.html { redirect_to(:action => :new) }
else
format.html { render :controller => :contactos, :action => :new
}
end
end
end
when the form have an error ,they should show error.. and do it.
but the url 'contactos/new' to 'contactos'
then if i use redirect_to ... the form don't show the errors
my question..how i do keep the url?
sorry for my language D=
thx for the help!
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---