blob: 04540d6e40aeec28a452c1b56872de42a070e21d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
require 'rails_generator'
class ModelGenerator < Rails::Generator::Base
def generate
# Model class, unit test, and fixtures.
template "model.rb", "app/models/#{file_name}.rb"
template "unit_test.rb", "test/unit/#{file_name}_test.rb"
template "fixtures.yml", "test/fixtures/#{table_name}.yml"
end
end
|