GZip file generation was taken out last year from sprockets. This change re-introduces compressed file generation and parallel file writing, which is useful for web servers that don't support gzipping static assets. This is pretty useful if you are on a service like Heroku.
Previously error pages are always being delivered in html pages in development mode, which is not handy when you would like to view json responses. This change adds support for viewing errors in json format. It also makes sure that when requesting resources like post/1.json, when error occurs, it returns json response based on json format in url, unlike previously used html format.
protect_from_forgery will now be inserted into the callback chain at the
point it is called in the application. This is useful for cases where you
want to protect_from_forgery after you perform required authentication
callbacks or other callbacks that are required to run after forgery protection.
If needed, you can use protect_from_forgery prepend: true
to always run protect_from_forgery before others.
Previously, if assert_response was checking for any non-redirect response like :success and actual response was a :redirect then, the error message displayed was like - Expected response to be a <success>.
This change, now shows the redirected path in error response as- Expected response to be a <success>, but was a redirect to <http://test.host/posts/lol>
That's all for This week in Rails. As always, there are many more changes than we have room to cover here, but feel free to check them out yourself.