Sha256: d4146aac8be2ba18521bb48bc9a6ce217847a5d6d2503c6c5b5296b0a57b8b8e
Contents?: true
Size: 669 Bytes
Versions: 1
Compression:
Stored size: 669 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) m.directory File.join('test/fixtures', 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.2 | lib/rails_generator/generators/components/model/model_generator.rb |