Revert "rails4 compatibility"

This reverts commit ee7e45d166bc9021820e201bc2c384e8c7dee7a3.
second attempt gaining rails4 compatibility