Custom REST routes

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.

como hago esto en routes?

gracias

William B. wrote:

ahora los molesto con las rutas de rest customizadas, tengo que hacer

Te ayudará mucho este [1] screencast: “Custom REST Actions”

[1] #35 Custom REST Actions - RailsCasts

Espero te sirva.

Saludos

On 9/25/07, DAZ [email protected] wrote:

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 %>

Also, grab this:
http://topfunky.com/clients/peepcode/REST-cheatsheet.pdfit’s been an
invaluable reference for this stuff to me.

Jason

Thanks Jason,

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