Add Compatibility with Rails 4