Re: can all methods be made to fit REST?

Jeremy McAnally
2007-10-18T17:47:38Z

In my experience, I''ve found that you either create a custom method
(blahblahblahdon''tdothatblahblah) or another controller.  In this
situation, it would depend on the scale of the application and how
much the remote API was going to be used.  Little to no remote API
usage?  Custom method it is.  A _lot_ of API usage...I might consider
another controller.

I don''t think either way is the absolute correct way, but I think you
have to formulate your answer based on the application itself and how
it will be used.

--Jeremy

On 10/18/07, Ant <email2ants-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
>
> I know that if you listen to DHH and similar REST evangelists that
> they would have you believe that all methods can be reduced to the
> seven that fit the REST conventions (create, show, update, destroy,
> index, new, and edit). I am not yet convinced.
>
> For example can anybody think what model I would use for
> forgot_password and reset_password. I have a user model that has a
> password as a field. I do not really want to have a password model
> since I guess this is supposed to map to a password table in the
> database.
>
>
> What does everybody think. As you can see this is more of a
> philosophical than a technical question.
> Looking forward to some interesting replies.
>
> Anthony
>
>
> >
>


--
http://www.jeremymcanally.com/

My books:
Ruby in Practice
http://www.manning.com/mcanally/

My free Ruby e-book