What's New in Edge Rails #7
Week of January 29-February 4, 2012
Things are still moving along on the Rails 4 front, with a mix of tidying up and new features. Here are some of the commits that caught my eye last week.
- A whole mess of commits worked over some of the collection form helpers. Now
collection_select
andoptions_from_collection_for_select
can take procs to evaluate their text and value in the current context, and there are newcollection_check_boxes
andcollection_radio_buttons
helpers. The easiest starting point is with f506c806 which documents the API changes. - 8270e4a8 implements the null object pattern for Active Record relations. Post.none will return a relation containing no posts - which may seem daffy, but makes for much nicer chainable methods on your Active Record objects.
-
b31eac56 replaces all
for
loops in the Rails source code withEnumerable#each
. This should lead to considerably less confusion for new Rails developers. -
336ff8a9 reworks the
:dependent => :restrict
construct for Active Record associations to deprecate raising an exception on violation. - 66c04431 updates Rails' Unicode support from 6.0 to 6.1, making it pile of poo compatible.