Rails3 fixes

While testing the Dashboard 1.3 in recent days I encountered a few issues that I've fixed in this PR. Please, review and consider merging into the upstream rails3 branch.