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 #860 | Main | Double Shot #859 »
Monday
Apr162012

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