Feature/rails3 bugfixes

Fixes for 

https://www.openproject.org/issues/1679