Davis W. Frank's blog



Standup 7/25/2008

edit Posted by Davis W. Frank on Friday July 25, 2008 at 04:25PM

Interesting Things

  • There was an edge version of Rails (this project has a frozen Rails at some point in the past) that had a bug where a namespaced route would send a POST that should go to MyController#create was instead going to a POST to MyController#index. The fix is to freeze to current Edge, or use alias_method.

Ask for Help

"Any way to turn off a validation in a re-opened class?"

No way to do this. Best to refactor by pulling the validation out of the class and then mixing it in, or not, at a different level.

Standup 7/23/2008

edit Posted by Davis W. Frank on Wednesday July 23, 2008 at 04:39PM

Interesting Things

  • Y!Slow + Firebug + submit a form will cause the result to be pulled from cache instead of hitting your server. The workaround is to disable Y!Slow.
  • Some of our customers are requesting targeting Firefox 3, which has some rendering differences from FF2. So we're adding FF3 to the system image with a new icon and the correct trick to let it run side-by-side with FF2.
  • On a related note, rumor is that Facebook is dropping support for IE6. So is 37Signals.
  • Interesting issues with the Globalize plugin & Rails 2.1:
    • The currency formatting code does not work at all anymore - it always uses a '$'
    • Their work for localizing templates, which involves injecting a fully-qualified path, breaks #assert_template. The workaround is to comment out the path injection code, but this only works if you don't have localized templates.
  • EngineYard's eycap gem version 0.3.6 now has better support for deploying from SVN tags
    • Deploying from tag, since the URL was different used to do a rm -rf, which takes a long time on EY's GFS disks for large file sizes. This was causing a customer's deploy taking ~20 minutes
    • The fix was to change eycap to use svn switch; the deploy now takes ~1 minute

Ask for Help

"Anyone seen/solved an issue with random font size increase using Firebug 1.1 or later?"

The issue is that at some point a page will render with much larger fonts and the CSS exploration won't tell you why. The work around is to launch a browser with Firebug disabled and run it side by side with the same page in a window with Firebug enabled (restarting the 2nd window whenever the problem occurs.)

Seeing this with Firefox 2 and 3 and any Firebug later than 1.05 (which doesn't run on FF3). This might be an issue with IFRAMEs, but we're not sure. No data found on this via Google searches or the Firebug group. We will post there.

Standup 07/22/2008

edit Posted by Davis W. Frank on Tuesday July 22, 2008 at 04:24PM

Interesting Things

  • New Relic is presenting at our Tech Talk this week. Expect good information about using their real-time performance monitoring tool on your Rails projects.
  • Pivotal Tracker, our home-grown Agile project management site, should get even more beta tonight. Users should be able to create their own projects! Check it out.

Standup 07/21/2008

edit Posted by Davis W. Frank on Monday July 21, 2008 at 04:45PM

Interesting Things

  • Model#update_all is your friend if you're not yet on Rails 2.1

    Like Model#update_attribute for each attribute, #update_all will save direct to the database, bypassing validation, updating only the columns you specify. In Rails 2.1, with partial model updates, you may not need this. But if you've not yet upgraded your application, then give #update_all a try.

Update: fixed per comment. Model#update_attribute does not validate. Thanks for the catch!