Archive for the ‘Programming’ Category

Upgrading to Rails 3: Beware of the Object#tap pattern

September 2nd, 2010 at 2:23 pm • permalink0 comments

The advent of Object#returning first, and Object#tap consequently, quickly lead to a very common and elegant pattern in the Rails community to scope a variable to a block in your template code. Here’s a simple .erb file. <% “Simone”.tap |string| %> Hello, <%= string %>. <% end %> Once executed, in Rails 2.3 the template [...]

Upgrading to Rails 3: You are using the old router DSL which will be removed in Rails 3.1

August 30th, 2010 at 1:28 pm • permalink1 comment

How to fix the DEPRECATION WARNING: You are using the old router DSL which will be removed in Rails 3.1.

Capistrano: Executing a command as root without using sudo

July 27th, 2010 at 1:20 pm • permalink0 comments

How to run a command in Capistrano as a root without using sudo.

The Road to Rails 3: make your Rails 2.3 project more Rails 3 oriented

July 26th, 2010 at 4:12 pm • permalink5 comments

The goal of this article is to feature a list of tips and changes you can already introduce in your Rails 2 application to anticipate the migration and make your code more compatible with Rails 3.

Unobtrusive JavaScript in Rails 3

June 8th, 2010 at 1:40 pm • permalink20 comments

How to upgrade your JavaScript codebase from Rails 2 to Rails 3 Unobtrusive JavaScript, with real jQuery examples included.

Follow Me
    Random Quote