<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt">I've never seen case being used like this before - it does look neat/concise. Will definitely look at using it to simplify some code in future.<br><br>As you say, the instance variables seem to be getting corrupted/switched. Something similar to me has happened to me, but I just can't remember how we resolved it.<br><br>Can you tell a bit more about the app:<br><span></span><div><span>Where are your instance variables being defined? <br></span></div><div><span>Are all the the variables being defined each controller method or are you using a global method in the application_controller?</span></div><div><span>Do you ever get a "NameError: undefined local variable or method ... " error? <br></span></div><div><span><br></span></div><div><br><span></span></div><div><span>Maybe a gem like https://github.com/rails/exception_notification will be
 able to tell you more.<br></span></div><div><br><span></span></div><div><span></span></div><div> </div><div><i>James Cumming, CFA<br></i>+44 7799 554468<br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font face="Arial" size="2"><hr size="1"></font><br></div></div></div></body></html>