Add rails4 compability

Adding of separate branch will be welcome.
#42