Rails 4 support with Rails 3 backwards compatibility