Buenos dias, he aprendido mucho de rails gracias a todos sus aportes,
pero se que aun me falta mucho mas.
ahora los molesto con las rutas de rest customizadas, tengo que hacer
una vista de consulta por un campo de un modelo, esta vista dse llama
consulta.rhtml, la accion logicamente consulta, debo hacer una consulta
y actualizar luego el modelo.
There’s special checking for the request type, whether POST GET DELETE
or
PUT. Your controller actions get wrapped up in these checks when you
setup
these type of resources.
To do update and create, you’re looking at using:
Update:
<% form_tag page_url(@page), :method => :put do %>
Create:
<% form_tag pages_url, :method => :post do %>
I think that the method you are describing will only work if I’m
using
map.resources :pages
But I want to avoid using that as it seems to force me into using
paths of the form
/pages/:id
This is not what I want - I don’t want the word ‘pages’ there and I
want a drill down of page permalinks with the last one being the page
being requested.
I have the cheatsheet already - it is very helpful.
cheers,
DAZ
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.