What's New in Edge Rails #11
Week of February 26-March 3, 2012
The big news this week is the switch to requiring whitelisting all Active Record attributes by default. (See Double Shot #831 for some of the nonsense that led up to this). The impact is simple: you need to add an attr_accessible
declaration to all of your models before update_attributes
will change anything about them. You should have been doing this anyhow.
- 641a4f62 turns on attribute whitelisting in Active Record by default. This is a change to Rails behavior.
-
ActiveModel::Model
shows up in 3b822e91 as a way to make Active Model objects work directly with Action Pack. Documentation is in cb9d03f0. - 9b2c38b7 reduces the default connection pool size to 1 in new applications, trusting that people who need more for multithreaded applications will know what to do.
- A little sugar: d6366625 adds
last_year
,last_month
andlast_week
as aliases for the correspondingprev
methods. - cd5dabab adds some optimization for path helpers. You won't have to change anything in your code, but all _path and _url helpers speed up by a factor of 5 or so.
- b8396578 features a bit of trolling due to a mass-assignment bug at GitHub. Removed a bit later in 2b74968f.
- efd557a6 adds a new Guide for API-only applications. Note that some of the code in it hasn't been implemented yet - something I'm not personally too keen about having in a Guide.