Results 1 to 7 of 7
Apr 28, 2010, 20:30 #1
- Join Date
- Apr 2010
- 0 Post(s)
- 0 Thread(s)
Need to add user_id value to all story table entries
I'm up to page 283 of Simply Rails 2 in the "protective measures" chapter. As the note states, I'm getting errors because now that I'm attempting to reference a user_id, and none exist in previous entries, it is failing...
I thought that I could change all of the story entries in the table by doing the following in the console
Story.findall) do |s|
but this doesn't seem to have many any changes.
I *can* do
s=Story.find(id=6) (id = 6 as an example)
and it'd update the entry accordingly, so I thought it'd work in the block too.
Could somebody tell me if it is possible to get that to work as well in the block to mass change all the entries?
Thanks in advance!