Ruby on Rails Wednesday, January 31, 2018



On Thursday, February 1, 2018 at 2:30:07 AM UTC-5, fugee ohu wrote:
I'm having find_or_create_by roll back on me in the console directly from the model I'm not providing an id, the mysql id column is autoincrement
Model.find_or_create_by(person_id: 1, picture_id:37)


Forgot to mention Model belongs_to 4 other models

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e662ef65-e157-45eb-83ce-f92cfe05ab0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment