Erik Hanson's blog
Ask for Help
Exceptions thrown in Rails views get wrapped by
ActionView::TemplateErrorwhich 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
onsubmitattribute added to aformelement doesn't get called whenform.submit()is called from Javascript.
- Try using Javascript to attach an onsubmit handler rather than adding it as an attribute of the
formelement. - Instead of calling
form.submit()from Javascript, send a click event to a hiddensubmitbutton.
Timezones are being ignored when a date is passed into ActiveRecord's
findmethod, 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
GatewayPortstoyesinsshd, 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.
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).
