Add :via to avoid Rails 4 deprecation warning.