Skip to content

Commit

Permalink
Explicitly set note.user in db/seeds.rb
Browse files Browse the repository at this point in the history
Work around `attr_accessible`.
  • Loading branch information
Malcolm Locke committed Nov 1, 2011
1 parent 7f110e0 commit 6791b38
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@
:story_type => 'feature', :requested_by => user, :estimate => 1,
:labels => 'estimates,features'

story.notes.create! :note => "Here is a comment", :user => user
story.notes.create! :note => "Here is another comment", :user => user
2.times do |n|
note = story.notes.build :note => "This is comment number #{n + 1}"
note.user = user
note.save!
end

0 comments on commit 6791b38

Please sign in to comment.