2008年3月10日 星期一

generate a model

ex: ruby script/generate model Book

the files generated:
(1)book.rb:
class Book < ActiveRecord::Base
end

(2)book_test.rb
for unit test

(3)books.yml
a fixture, are files that contain data for unit test

(4) 001_create_books.rb
a migration file

沒有留言: