Fix #2 not available in rails 4
Merge pull request #3 from asteinwedel/rails4_bugs

Fix #2 not available in rails 4