HasMany association is not associate primary key after build #11158

Closed
manzhikov opened this Issue Jun 28, 2013 · 8 comments

Comments

Projects
None yet
3 participants

For example

rails '4.0.0'

Article.find(1).comments.build
 => #<Comment id: nil, article_id: 0, body: nil, created_at: nil, updated_at: nil>

rails '3.2.13'

Article.find(1).comments.build
 => #<Comment id: nil, article_id: 1, body: nil, created_at: nil, updated_at: nil>

With clean rails it is working fine. Seems like problem with some other gem. I will dig more into it.

@manzhikov manzhikov closed this Jun 28, 2013

Member

arunagw commented Jun 28, 2013

thanks

Contributor

shioyama commented Jul 8, 2013

I'm observing the exact same issue working on updating globalize3 for rails4. Not sure yet what is triggering it, but it was working fine in 3.2.x.

@shioyama yes, the problem in globalize3 for rails4.

Contributor

shioyama commented Jul 8, 2013

@manzhikov oh ok, then we're dealing with the same problem. If I figure it out I'll let you know.

Contributor

shioyama commented Jul 8, 2013

@shioyama Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment