Erik Hanson's blog



Erik HansonErik Hanson
Standup 2009-11-06
edit Posted by Erik Hanson on Friday November 06, 2009 at 01:38PM

Ask for Help

Exceptions thrown in Rails views get wrapped by ActionView::TemplateError which makes rescuing specific exceptions hard

It's probably best to prepare all your data in your controller or models and not in the view, which will obviate this and other problems.

Ask for Help

Does anyone have suggestions for an off-the-shelf data reporting tool to help display some data in a webapp for internal users to see?

form.submit() vs. <form onsubmit="...">: An onsubmit attribute added to a form element doesn't get called when form.submit() is called from Javascript.

  • Try using Javascript to attach an onsubmit handler rather than adding it as an attribute of the form element.
  • Instead of calling form.submit() from Javascript, send a click event to a hidden submit button.

Timezones are being ignored when a date is passed into ActiveRecord's find method, but are not ignored when passed into other methods.

This seems to be due to a bug in ActiveSupport's to_s(:db). One solution is to override to_s and fix the time zone.

Interesting Things

  • When trying to create an ssh tunnel to EngineYard, set GatewayPorts to yes in sshd, otherwise the tunnel won't bind to your local computer.

  • WAVE Toolbar (Web accessiblity evaluation tool) is a great Firefox extension that shows you which parts of your pages have accessibility issues.

  • The next meeting of the San Francisco Pivotal Tracker Users Group is tonight at 6:30 PM at the Pivotal Labs headquaters on Market St.

Erik HansonErik Hanson
Standup 2009-11-02: WTF?
edit Posted by Erik Hanson on Tuesday November 03, 2009 at 08:55AM

Interesting Things

  • git-wtf is a useful script for showing the state of your git repo. It was mentioned specifically for its ability to show you the details about the commits you haven't yet pushed (especially if there have been multiple commits by other people in the meantime).