On Dec 29, 2011, at 12:11 PM, Robert Kaufman wrote:

> Hi Ylan,
>   
>   Session store can be a pain in the butt, especially if users have different 
> browser settings.  Checking that it is not a browser version thing is a good 
> start, but I wonder if you've ever been able to reproduce the issue with a 
> computer that you control?

Nope, I have not. That is why it's giving me a hard time, I can't recreate the 
conditions that cause it.

>  Sometimes toolbars (Yahoo, Norton, etc) or security software (Anti Virus, 
> Firewall, etc) or browser preferences can mess up your session storage.  I'm 
> assuming from your code that the order id's are fairly short numbers, so you 
> probably are not over running the session size limits.

Yeah, I don't think it's the session limit. My order numbers are all below 
300000


> 
>   Setting browser issues aside for a moment, I do see a few potential problem 
> spots in your code, which might account for some edge case behavior.  Lets 
> try cleaning those up and then see where we are.  I made you a series of 
> Gists, the first one is your code, but with a bunch of comments about what 
> I'm changing and why:
> 
> https://gist.github.com/4627ab3dcf02ad1f7da2/eb4d288a8153ddab40ff466d88613a50082c18ea
> 
> This second one has the actual changes that I would make.  I've done all of 
> this just in a text editor, so there may be typos, but it should show my 
> thought process at the moment.
> 
> https://gist.github.com/4627ab3dcf02ad1f7da2/10b70fc8a516aa45bad80d84a3a47fec388add13

Thanks for the critique! I will jump in right now and start cleaning up some 
stuff!

Bt the way, the redirect_to order_path works without a parameter because my 
order is a single resource (routes uses resource and not resources). That way 
the paths look like /order and not /order/343333

I'll get back when I do some refactoring. 

Thanks for taking the time to chime in.

--
Ylan

-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby

Reply via email to