>> messages = YAML.load(File.open(RAILS_ROOT + '/test/fixtures/message_triggers.yml'))
>> messages.each{|m| MessageTrigger.create(m[1])}
Notes to self
Showing posts with label yaml fixtures. Show all posts
Showing posts with label yaml fixtures. Show all posts
Tuesday, March 18, 2008
Loading fixtures separately
Recently I had to load one single fixture file in to the database. Here is how I did it:
Subscribe to:
Posts (Atom)