I reported this issue a while ago and just got around to writing a test and a fix. It would be nice if someone could provide a second look and improve or merge this
https://github.com/rails/rails/issues/3450 Short description: When creating an association class Foo belongs_to :bar, :validate => true end the validation does not check if the target of the association proxy is stale and can end up validating an object that is different from the one you would receive from foo.bar. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/4g_ja71RPJkJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
