Rails4 compatibility

Hi,

i have made some changes to get this plugin running on rails 4 without deprecation warnings and errors. I hope it will get merged soon that i can work against the official repo again.


Cheers,
  Thomas