updated for rails4

Hi , I´ve updated some code for rails4 compatibility.

it still fails 7 specs which are currently failing in travis https://travis-ci.org/collectiveidea/audited/jobs/13174653 

Hope this helps