[Rails] How to clear/reset a corrupt session (rails 2.3)

2014-05-22 Thread Avram Dorfman
Hello, We have a rails 2.3 app with a large number of live users, and we have recently done something to corrupt some users sessions in such a way that any attempt to use the session object itself raises an exception. reset_session is also raising the same exception, and not clearing the session.

[Rails] Inflection nightmare

2011-05-26 Thread Avram Dorfman
Hello, Can someone tell me how to teach the Inflector to stop treating a particular word as irregular that is not? I have an app that has a model named Regatta and another model named RegattaInclusion (which is the join model for an HMT relation. Out of the box, regatta.singularize returns

[Rails] Re: Inflection nightmare

2011-05-26 Thread Avram Dorfman
ruby-1.8.7-p334 :004 regatta.singularize = regattum ruby-1.8.7-p334 :005 So, no dice. Annoying and stange, huh? RIght, no dice. At this point I have wrapped the Inflections module to manually return the correct results for regatta and regattas and then just call back to the original for

[Rails] yield, helpers with blocks, and double-output

2010-09-03 Thread Avram Dorfman
Hello, I'm having a hard time understanding how you are supposed to write helpers that take blocks now in Rails 3. According to 7.4.2 here: http://edgeguides.rubyonrails.org/3_0_release_notes.html you are supposed to write your helpers to return their result as text, rather than append to

[Rails] integration test not calling destroy

2009-01-04 Thread Avram Dorfman
Hello, I'm writing to describe a problem I ran into, and the solution, which I've already found, for posterity's sake, b/c it took a very long time to figure out. While I don't consider myself a rails newbie, this does qualify as a rookie mistake. I was having an integration test fail

[Rails] modifying bindings

2008-12-12 Thread Avram Dorfman
Hello, I have a little challenge that is frustrating me. I am trying to write a wrapper around cache() so that my fragments get cached with comments injected at the front and back. Unfortunately it is not as simple as using concat(text,block.bindings) before and after the call to cache()

[Rails] expire entire directory of fragments?

2008-12-12 Thread Avram Dorfman
Hello, I am trying to figure out if there is an appropriate and for that matter, already built-in way to expire an entire directory of cache fragments. My app has certain situations where an entire subdirectory in the cache becomes obsolete at once - rather than expiring each file one at

[Rails] subdomain-based page caching?

2008-12-12 Thread Avram Dorfman
Hello, I just wanted to verify my understanding; As of rails 1.2, it was impossible to have independent page caches on a per-domain basis, right? In other words, if a single rails app responds to both http://foo.com/index.html and http://bar.com/index.html, and uses page caching, it