Add rails 4 compatability
Add rails 4 compatability