A Fresh Cup is Mike Gunderloy's software development weblog, covering Ruby on Rails and whatever else I find interesting in the universe of software. I'm a full-time Rails developer and contributor, available for long- or short-term consulting, with solid experience in working as part of a distributed team. If you'd like to hire me, drop me a line. I'm also the author of Rails Rescue Handbook and Rails Freelancing Handbook.

Navigation
« Double Shot #832 | Main | Double Shot #831 »
Monday
Mar052012

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 and last_week as aliases for the corresponding prev 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.

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>