Goodbits logo black in white circle

This week in Rails

Past issues
Aug 1 Aug 22

Aug 8 2014

Issue #19


Logo for This week in Rails

Issue #19

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!

Featured

This week's Rails contributors

This week's Rails contributors

This week we have 30 awesome contributors who helped improve Rails. Give them a hug when you run into them next time!

Showing off

Showing off

Teasing aside, this is definitely a good Ruby trick/idiom to pick up!                                                                                                    

New Stuff

`after_bundle` callback in Rails templates

`after_bundle` callback in Rails templates

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.

Fixed

Automatically maintain test DB schema (again)

Automatically maintain test DB schema (again)

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!

Using `defined?` in view templates

Using `defined?` in view templates

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?.

Weak ETags in Rack master

Weak ETags in Rack master

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.

Fixed updating custom primary keys

Fixed updating custom primary keys

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.

Blank passwords and `has_secure_password`

Blank passwords and `has_secure_password`

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.

Rename `MiniTest` to `Minitest`

Rename `MiniTest` to `Minitest`

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

P.S. Feel free to share this newsletter with your Rails friends!











Previous Issues

  • Sep 27

    Autumn is here, and so is Rails 7 Alpha 2! 🍂

  • Sep 17

    Rails 7 alpha released

  • Sep 11

    Bye-bye Byebug, Hello jsbundling and cssbundling!

  • Aug 28

    Remove default reliance on Sass and more!

  • Aug 21

    Good-bye classic mode, --skip-puma, --skip-gemfile.. hello weekday_options_for_select!

  • Aug 13

    ESM importmap and Marginalia

  • Aug 8

    Active Record goodies and more!

  • Jul 31

    Favicons, InvalidAuthenticityToken message gains, Journey optimizations and more!

  • Jul 23

    Active record improvements and much more

  • Jul 19

    Performance and parallel testing improvements and more!

Load More

© 2014-2025 This week in Rails.

Goodbits logo square wrapper Published on Goodbits