copied from 2013-q3-rails-1_old