second attempt with Rails3.2