Sha256: 973d609dd806c8e30afdea5ad0683f8e5457f41f6f997e76dfaaaec1b25dc01e

Contents?: true

Size: 703 Bytes

Versions: 4

Compression:

Stored size: 703 Bytes

Contents

class CreateFakeBooksAndShelves < ActiveRecord::Migration
  def self.up
    books = []
    books << Book.new(:title => "The Pragmatic Programmer", :author => "Dave Thomas")
    books << Book.new(:title => "Agile Web Development With Rails", :author => "Dave Thomas")
    shelf = Shelf.new(:name => "Ruby Geekery")
    books.each { |book| shelf.books << book }
    shelf.save!

    books.clear
    books << Book.new(:title => "Kama Sutra", :author => "Who fucking knows")
    books << Book.new(:title => "Sex for Dummies", :author => "Some guy")
    shelf = Shelf.new(:name => "What geeks SHOULD be reading")
    books.each { |book| shelf.books << book }
    shelf.save!
  end

  def self.down
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dm-rest-adapter-0.9.9 fixtures/book_service/db/migrate/20080629143033_create_fake_books_and_shelves.rb
dm-rest-adapter-0.9.10 fixtures/book_service/db/migrate/20080629143033_create_fake_books_and_shelves.rb
dm-rest-adapter-0.9.7 fixtures/book_service/db/migrate/20080629143033_create_fake_books_and_shelves.rb
dm-rest-adapter-0.9.8 fixtures/book_service/db/migrate/20080629143033_create_fake_books_and_shelves.rb