Fixed support of Rails 3.0.x