Tested with Rails 4