Welcome to This week in Rails, your weekly inside scoop of interesting commits, pull requests and more from Rails. Without further to do, let's dive right into the highlights of the week!
This pull request introduces a new hook for use in Rails application templates. The block passed to this callback method will be executed after the bundle as well as after the binstubs are generated, allowing you to further customize the result of those steps to your liking.
This feature was introduced in Rails 4.1. Unfortunately it does not work with structure.sql due to a bug in the implementation. The previous patch that addressed the issue was temporarily reverted due to another bug it introduced. This pull request is the latest attempt to address all these issue once and for all – hopefully we got it right this time!
Previously, the documentation suggested that you need to jump through some hoops to check if a local variable has been defined. Apparently, this is no longer necessary and you can simply do that with the Ruby Way™ using defined?.
A recent change in Rack was causing our builds to fail. With this change, Rack will generate "weak" ETag validators going forward. Check out the original issue and this wikipedia entry to learn more about this change.
If you have to interface with legacy databases that uses custom primary key formats, this patch would allow you to update the value of these primary keys correctly.
Previously, an implementation issue was causing has_secure_password to (incorrectly) reject blank passwords (i.e. spaces only) without any feedback for the user. This has now been fixed on master. If you would like to block users from using these passwords, you might want to add some extra validation rules for your application going forward.
According to the package maintainer Ryan Davis, Minitest is now the canonical spelling for the accessing the constant. If your application or your gems have references to the old MiniTest constant (now an alias), now would be a good time to start switching them over!
Wrapping up
And that's it for this issue of This week in Rails. As always, there are a lot more changes on Rails than what I can cover in this newsletter, so I encourage you to check them out yourself!
If you have any feedback for me, please feel free to email me or let me know on twitter! Thank you for reading! <3 <3 <3