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?
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.
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?
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.