RubyAndRails 2010

RubyEnRails returns this year bigger and better as RubyAndRails 2010, running from 21-22 October in Amsterdam. Talks are in English and entry is just €149,00.

The speaker lineup is shaping up great. Check out the program and sign up now.

RubyAndRails has been run by volunteers for five years now, growing from a friendly regional gathering to an even friendlier all-European event. The Rumble is back this year, too!

Ruby on Rails 2.3.9 Released

We’ve released Ruby on Rails 2.3.9 (gem and git tag) to extend the 2.3.8 bridge a few steps closer to Rails 3 and Ruby 1.9. If your app runs on Rails 2.3.9 without deprecation warnings, you’re looking good for an upgrade to Rails 3.

Deprecations

  • Changes i18n named-interpolation syntax from the deprecated Hello {{name}} to the 1.9-native Hello %{name}.
  • Replaces Kernel#returning with Object#tap which is native to Ruby 1.8.7.
  • Renames Array#random_element to Array#sample which is native to Ruby 1.9.
  • Renames config.load_paths and .load_once_paths to the more accurate config.autoload_paths and .autoload_once_paths.

Along with these deprecations come a broad array of bugfixes and minor tweaks. Read the commit log for the full story.

Onward to 3.1!

Ruby on Rails 2.3.8 Released

The 2.3.7 release slipped out the door too hastily. Fixing compatibility with the rails_xss plugin inadvertently forced everyone to use it. Facepalm.

I apologize for wasting a chunk of your day on installing what ought to have been a patch-level update only to find it breaks your app. That’s well out of line with our stable release process and it’s my fault for stepping out of it. I got caught up in a sky-is-falling response to a 2.3.6 bug that affected a handful of users and responded with a fix that exposed a new flaw to nearly all users, despite testing and sanity checking.

Thanks for all your feedback today. We hear you, and yes, a thousand times yes. Every stable release, including point releases, deserves the same methodical drumbeat on its march from git stable to to .pre gem to final gem. Expect no less.

Now, on to the gem-cutting: Rails 2.3.8 is available now, bringing us back to stable ground.

Ruby on Rails 2.3.7 Released

With the 2.3.6 release hot out of the oven, Nathan Weizenbaum began updating HAML to support it. He uncovered a couple of bugs in the HTML-safety changes backported from Rails 3, so we’re cutting a 2.3.7 release to fix them.

If you use the rails_xss plugin for automatic HTML escaping, you should upgrade to Rails 2.3.7 and the latest rails_xss plugin.

If you don’t use the rails_xss plugin yet, now’s the time to start. It’s baked in to Rails 3.

Update: fixing compatibility with the rails_xss plugin broke HTML-safety for apps that don’t use rails_xss. We’re sorry, all: HTML-safety is meant to be opt-in! The fix is available now in 2.3.8.pre1 and will be released shortly.

Ruby on Rails 2.3.6 Released

We’ve released Ruby on Rails 2.3.6: six months of bug fixes, a handful of new features, and a strong bridge to Rails 3.

We deprecated some obscure and ancient features in Rails 2.3.6 so we could cut them entirely from Rails 3. If your app runs on Rails 2.3.6 without deprecation warnings, you’re in good shape for a smooth sail onward.

This slow-cooked dish is brought to you some 87 committers from our all-volunteer kitchen.

Now, let’s open the goodie bag!

Action Pack

  • Upgrade Rack from 1.0.1 to 1.1.0.
  • XSS prevention: update to match Rails 3 and move to the official plugin at http://github.com/rails/rails_xss.
  • Cookies: convenient cookie jar add-ons to set permanent or signed cookies, or both at once: cookies.permanent.signed[:remember_me] = current_user.id. Read more.
  • Flash: promote alert and notice, the most common flash keys in many apps, to self.alert = '...' and self.notice = '...'. Add redirect_to url, :alert => '...' and :notice => '...'. Read more.
  • i18n: localize the label helper.

Active Record

  • Namespacing: support optional table name prefixes on modules by defining self.table_name_prefix. Read more.
  • Destroy uses optimistic locking.
  • Counter cache: use Post.reset_counters(1234, :comments) to count the number of comments for post 1234 and reset its comments_count cache.
  • PostgreSQL: always use standard-conforming strings, if supported.
  • MySQL: add index length support. Read more.
  • MySQL: add_ and change_column support column positioning using :first => true and :after => :other_column.

Active Support

  • Upgrade i18n from 1.3.3 to 1.3.7.
  • Upgrade TZInfo from 0.3.12 to 0.3.16.
  • Multibyte: speed up string verification and cleaning.
  • JSON: use YAJL for JSON decoding, if available. gem install yajl-ruby
  • Testing: add assert_blank and assert_present. Read more.
  • Core: backport Object#singleton_class from Ruby 1.8.8, deprecating our Object#metaclass.
  • Core: add Object#presence that returns the object if it’s #present? otherwise returns nil. Example: region = params[:state].presence || params[:country].presence || 'US'
  • Core: add Enumerable#exclude? to match include?.
  • Core: rename Array#rand to Array#random_element to avoid collision with Kernel#rand.
  • Core: rename Date# and Time#last_(month|year) to #prev_(month|year) for Ruby 1.9 forward compatibility.

Active Resource

  • JSON: set ActiveResource::Base.include_root_in_json = true to serialize as a hash of model name -> attributes instead of a bare attributes hash. Defaults to false.

Action Mailer

  • Upgrade TMail from 1.2.3 to 1.2.7.

Railties

  • Silence RubyGems 1.3.6 deprecation warnings.

Peruse the commit log for the full story.

Ruby Summer of Code

Rails participated in Google’s summer of code program for the first time last year. We got four great projects and three long-term contributors from the effort, including Josh Peek and José Valim, who’ve both joined Rails core, and Emilio Tagua, who revitalized Arel and integrated it with Active Record.

We applied again this year but didn’t make the cut, so we moped for a day then thought, why not make this happen ourselves. So here we are kicking off the first Ruby summer of code together with Engine Yard and Ruby Central.

Head over to rubysoc.org to get started and start following @rubysoc for news.

We’re following Google’s example closely:

  • students are paid a $5000 stipend to work full-time during their summer break
  • a group of Ruby gurus volunteer their time as mentors
  • mentors vote on student proposals based on usefulness, benefit to the Ruby community, and history of motivated open source contribution

We’re looking for full- and half-summer sponsors as well as individual donations. We’ll fund as many students as we can. Donate this week and our own <s>Aaron aka tenderlove will match it!</s> Aaron tapped out, you dogs 🙂 Thanks Aaron! Now Chad and Kelly Fowler are matching! Donate now!

Ruby gurus, consider mentoring a student this summer. Volunteering to guide the next generation of Ruby developers is a challenging and rewarding effort.

Students: start your engines! Check out our ideas list and start brainstorming. Applications begin on April 5!

RubyEnRails 2009

RubyEnRails 2009 goes down this 30/31 October in Amsterdam. Talks are in English and Dutch.

RubyEnRails has been all-volunteer for four years running, building on a history of sweet venues, good talks, and great company. It’s gradually grown from a local gathering to a full-fledged European event, and this year it’s also stepping up to fill the shoes of RailsConf EU.

Yehuda and I are speaking and will be mixing a potent batch of Rails 3 kool-aid. Please join us for a sip!