Happy new year! How was your holiday break? Did you receive nice presents?
In case you missed it, Ruby 2.4.0 was released on Christmas day so if you haven’t done it yet…
rbenv install 2.4.0 right now!
The first week of 2017 has seen more than 100 commits to rails/rails. Congratulations to all the 32 contributors, in particular to the 8 people who contributed for the first time. Keep up the good work!
Here are the most relevant changes to rails master for this week.
With Action Mailer it’s now easy to specify the content type of your attachments. E.g.:
mail(body: "\<h1\>Hello\</h1\>", content_type: "text/html").
You can now ask Active Record to update specific timestamp columns when incrementing, decrementing, resetting, or updating counter caches.
If your app does not set
RACK_ENV then the value of
Rails.env will fall back to
development rather than just being an empty string.
Array#sum was defined in Rails with a monkey-patch. Ruby 2.0 introduced refinements for better encapsulation. This is the first PR where they are being used in rails/rails.
Some tests and code have been fixed and backported to 4-2-stable so that running Rails 4.2 on Ruby 2.4 will not raise any error.
In Ruby 2.4, NilClass, FalseClass, TrueClass, Symbol and Numeric all support
dup. For consistency,
duplicable? will now return
true for all these classes.
The way in which a
nil JSON payload is stored in a database was inadvertently changed in Rails 5.0. This fix maps
nil to SQL
NULL, exactly as how it was in Rails 4.x.
If the name of your Rails engine has a hyphen then this PR (fixing the path of namespaced controllers) is for you!
This fixes a regression by which cookies were only updated on GET requests. Now we will update the helper for all requests.
MySQL 5.0 reached “end of life” more than five years ago. Rails now requires at least version 5.1.10.
By now, you should have already dropped any reference to Rake’s
static_cache_control and ActiveRecord’s
See you all in Phoenix at the end of April!