Adding Rails 4 compatibility