flash[:notice] Security

"The Barge" wrote:

But the problem is, if someone hits refresh a few times it saves multiple times.

So the root cause seems to be multiple saves. I wonder if this is a normal behavior.

To me this sounds like a bug in your code.

Long

Long wrote:

"The Barge" wrote:
But the problem is, if someone hits refresh a few times it saves multiple times.

So the root cause seems to be multiple saves. I wonder if this is a normal
behavior.
To me this sounds like a bug in your code.
Long

Agreed. You’re ‘save’ action should re-direct to a ‘show’ action after saving, so that if the user refreshes, all they refresh is the ‘show’, not the ‘save’. See the ‘add_to_cart’ method in AWDR (Page 84 in the 1st addition) for an example.