Re: Renaming RESTful actions

Jason Roelofs
Fri, 16 Mar 2007 19:06:12 -0000

On 3/16/07, François Beausoleil
<francois.beausoleil-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
>
> Hi,
>
> 2007/3/16, Jason Roelofs
<jameskilton-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
> > A little more information, here''s my test (which is failing,
difference
> > being :action => ''create'' is generated, not
''upload''):
> >
> >      assert_recognizes({:controller => ''taxes'',
:action => ''upload''},
> {:path
> > => ''taxes'', :method => :post})
> >
> >  and current routing
> >
> >    map.resources :taxes, :new => {:upload => :post}
>
> map.connect "/taxes/upload", :controller => "taxes",
:action => "upload"
>
> Everything that existed before resources still exists now that
> resources are here.  That''s one of the nice thing.  We get to make
our
> cake and eat it too :)
>
> Bye !
> --
> François Beausoleil
> http://blog.teksol.info/
> http://piston.rubyforge.org/


I know that the old routing is still available, I''m trying to stay away
from
it as much as I can. The problem I have with REST right now is that there is
no "accepted spec" for doing REST, if that makes any sense. When it
comes to
controllers that are a little more complex than just serving up a view to a
model, is it ok to drop out of REST? What is the point that a site is
no-longer RESTful?