for rails 4
Merge pull request #1 from mois3x/master

for rails 4