RailsCasts Pro episodes are now free!

Learn more or hide this

frombarryville's Profile

GitHub User: frombarryville

Comments by

Avatar

I've been trying to get the user_id of whoever created the new items to be put into the column on the authors table. Been trying like this Author.create!(:name => $1, :user_id => self.user_id) but I keep getting NULL entries into the database. Any ideas?

Avatar

Using this gist you can also add custom entries.
https://gist.github.com/952240

Any idea how to get the user_id from the user who posted the entry? been trying Author.create!(:name => $1, :user_id => self.user_id) but I keep getting NULL entries into the db.