This week in Rails
Oct 23 2015
Ciao from Claudio! As we get closer to the first beta release of Rails 5, here are the latest updates about what was committed into rails/rails this week.
39 people contributed to Rails this week, including 7 first-timers! If you are interested in becoming a contributor, you can look at the open issues.
You can now set config.active_record.primary_key = :uuid to have the Rails generator add id: :uuid whenever your migrations create a table.
config.active_record.primary_key = :uuid
Delegating a method to :block will now raise an exception. This is to prevent Rails from trying to invoke a block, rather than delegating the method. Same for :args and :arg.
A great PR to learn how to contribute to Rails by improving performance while providing repeatable benchmarks to validate the results.
1.year used to return the number of seconds in a year as a Float. This was confusing and inconsistent with similar methods. Now it returns a Fixnum (in case you are wondering, it’s 31,557,600).
number_to_human(999_999_999) will now print "1 Billion" rather than "1000 Million".
Rather than a generic ActionController::BadRequest, requesting a route with wrongly encoded parameters will now return a more helpful message.
After this fix, calling helper in the Rails console, editing the source code of a helper and then typing reload! will work as expected.
Validating the numericality of BigDecimal was subject to errors due to the value being parsed to a Float. Everything works now!
When editing the API documentation, use an extra comma to keep the comments consistent, uniform, and beautiful.
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.
Until next time!