Complete rails3 upgade.

This pull request fixes minor bugs and completes some javascript UI that stopped functioning as part of the rails 3 upgrade.