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?


William B. wrote:

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

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


Espero te sirva.


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

There’s special checking for the request type, whether POST GET DELETE
PUT. Your controller actions get wrapped up in these checks when you
these type of resources.

To do update and create, you’re looking at using:

<% form_tag page_url(@page), :method => :put do %>

<% form_tag pages_url, :method => :post do %>

Also, grab this:’s been an
invaluable reference for this stuff to me.


Thanks Jason,

I think that the method you are describing will only work if I’m
map.resources :pages

But I want to avoid using that as it seems to force me into using
paths of the form


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.



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs