"stack level too deep" exception on Rails 3.2