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.

As of July 2016, I'm looking for my next job. I'm not able to relocate, so unless you're in the Evansville area, I'd need a completely remote gig. I have lots of experience working remote. Prefer full-time but I wouldn't be averse to an interesting contact gig. Drop me a comment if you've got something or email MikeG1 [at] larkfarm.com.

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>