I actually wrote that implementation for MerbClass with Matt, specifically
because the delete action will not be called when JavaScript is turned on
(i.e. the vast majority of cases). I feel that it's cleaner to have a
confirmation page for the few cases where JS is turned off than to just link
directly to the destroy page (esp. because JavaScript being off is likely to
be compounded in this case by a company firewall or mobile device, so
following web assumptions becomes crucial).
>From the perspective of the vast majority of your users, the experience is
identical to a link directly to the destroy action, but it uses a POST
action in the JavaScript so the web's infrastructure is happy.

-- Yehuda

On Wed, Jan 7, 2009 at 10:57 PM, Justin Smestad <[email protected]>wrote:

> Yehuda, than are you in support of Matt's implementation or something else?
> Justin
>
> On Jan 7, 2009, at 11:55 PM, Yehuda Katz wrote:
>
> Just to clarify... this is not just a "you should do it this way because
> it's prettier" issue. The infrastructure of the web, including caches and
> proxies, assume (as per the HTTP spec), that GET requests do not make
> modifications and can therefore be cached. Making your application compliant
> with the web is more than a "good idea", it's basically mandatory if you
> want to be sure it actually works behind company firewalls, combinations of
> end-user routers, mobile phones that use caching tricks to save bandwidth,
> etc.
> -- Yehuda
>
> On Wed, Jan 7, 2009 at 10:22 PM, Michael D. Ivey 
> <[email protected]>wrote:
>
>>
>> On Jan 8, 2009, at 12:09 AM, Roy Wright wrote:
>> > OK, I actually cheat a little in the controller and have the delete
>> > call the destroy method.  I really didn't want the "are you sure"
>> > prompt, so this seems to work fine from a link_to('delete',
>> > resource(obj, :delete))
>>
>> Yeah, this is pretty evil. Not only is it wrong, in the sense that GET
>> requests aren't supposed to modify anything, it opens you up to some
>> pretty nasty user experience bugs.
>>
>> You should listen to Matt. Seriously.
>>
>>
>>
>
>
> --
> Yehuda Katz
> Developer | Engine Yard
> (ph) 718.877.1325
>
>
>
>
>
> >
>


-- 
Yehuda Katz
Developer | Engine Yard
(ph) 718.877.1325

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to