hehe, no problem, that's why the mailing list is for. I remember the first
time I came across this issue and what convinced me was that a user can
press the reload button and the same action can be executed twice.

I believe I had a form adding a comment on the page or something like that.
Turned out that a new item was being added every time a user would refresh
the page after clicking on the link. That's when I learned that a POST
request should always be redirected to a GET request so the user could
refresh the page without breaking anything. Merb and Rails already do that
for you when we never ever have an update or destroy method render a
template but back then I was not using a nice framework and I had to learn
the hard way.

All that to say that I'm sorry for not explaining right away why what Justin
was trying to do was evil :)

- Matt


On Thu, Jan 8, 2009 at 2:03 PM, Roy Wright <[email protected]> wrote:

> Thanks everyone.  My base controller has now been modified to be GOOD.
> That's what I get for copying code and not taking the time to understand it
> completely.
>
> Thank you,
> Roy
>
> On Jan 8, 2009, at 3:32 PM, Richard Boldway wrote:
>
>  I think some of this bantering about has been fun to watch.
>
> I know from my shallow memory, the first thing that comes to my mind is
> that it is EVIL.
> But then I have to think a bit deeper why it is evil.
> Ahh.  Exposure to unintended results.  Not a good thing.
> Anyways I enjoyed the discussion and the reminders of why it is evil.
>
> Thanks you all.... Rich
>
> Jim Freeze wrote:
>
> On Thu, Jan 8, 2009 at 10:17 AM, Michael D. Ivey <[email protected]> 
> <[email protected]> wrote:
>
>
>  On Jan 8, 2009, at 10:04 AM, Jim Freeze wrote:
>
>
>  I think specifically the problem here (and the real reason this should
> not be done) is that a crawler (using get requests) can actually
> delete an object.
> To me, this is the real danger and the real issue and the reason for
> avoiding this type of web coding. Not because "it's evil", or "it will
> make the web unhappy" or "Matt won't be my friend". ;-)
>
>
>  That's why it's evil and that's why it makes the web unhappy. They're
> the same thing.
>
>
>  My point was that some people like to know the real cost. There are
> numerous examples of people succeeding by going against accepted
> convention. Just saying something is evil is a lame explanation. (Good
> thing DHH didn't listen to people saying what he was doing was evil).
> Saying 'it is evil' is no where near the same as saying 'your data
> could be destroyed by accident'.
>
> Jim
>
>
>
>
>
>
>
>
>
>
>
>
> >
>

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