Fix problems for Active Record Association on Rails 3