On Aug 15, 2014, at 4:20 PM, Sean Kelley <[email protected]> wrote:
> I must be honest- I am running into this problem myself learning rails. I > thought that when I create something the user_id should be generated > automatically in the created model. While testing I figured I would come > back to it. In the meantime I set user_id in my entry table manually in the > create method ( I am using devise): > @entry = Entry.new(entry_params) > @entry.user_id=current_user[:id] see http://guides.rubyonrails.org/association_basics.html#has-one-association-reference -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1C672209-6CDB-4446-BA4D-97825222CA90%40datatravels.com. For more options, visit https://groups.google.com/d/optout.

