Sha256: dd37d322f582202b62c37042dbee9c05093a88e79b44190accfaac81dc8e051b
Contents?: true
Size: 612 Bytes
Versions: 1
Compression:
Stored size: 612 Bytes
Contents
class ModelGenerator < Rails::Generator::NamedBase #:nodoc: def manifest record do |m| # Check for class naming collisions. m.class_collisions class_path, class_name, "#{class_name}Test" # Model, test, and fixture directories. m.directory File.join('app/models', class_path) m.directory File.join('test/unit', class_path) # Model class, unit test, and fixtures. m.template 'model.rb', File.join('app/models', class_path, "#{file_name}_model.rb") m.template 'unit_test.rb', File.join('test/unit', class_path, "#{file_name}_test.rb") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shattered-0.3.3 | lib/rails_generator/generators/components/model/model_generator.rb |