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 software developer: most of my time in recent years has been spent writing Rails, though I've dabbled in many other things and like most people who have been writing code for decades I can learn new stuff as needed.

Currently I'm unemployed and starting to look around for my next opportunity as a senior manager, team lead, or lead developer. Drop me a comment if you're interested or email MikeG1 [at] larkfarm.com.

« Double Shot #860 | Main | Double Shot #859 »

What's New in Edge Rails #17

Week of April 8 - April14, 2012

Lots of tidying up in the Rails source this week. It's amazing how much even a mature codebase can be improved when lots of people are nibbling away at it.

  • 1a20683f adds enough relations to NullRelation to make it chainable with database methods, so you can use Post.none anywhere you could use Post.all.
  • The FormBuilder class gets an index method in 47cbfbb9. Here's the sample usage from the commit:

<%= form_for @person do |person_form| %>
  <%= person_form.fields_for :projects do |project_fields| %>
    Project #<%= project_fields.index %>
  <% end %>
<% end %>
  • 1bac04e85 optimizes the performance of #delegate. It's a mildly-breaking change, though, in that you can no longer delegate to private methods.
  • With ca0af822, you get an automatic index when using references or belongs_to in migrations. That's nice; it would have saved me typing add_index about eleventy-seven times by now.

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):
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>