Sha256: 9949c25736cbba75b02227c0f9c2cda23f24473c7df522508a653d9c46fa6834
Contents?: true
Size: 320 Bytes
Versions: 1
Compression:
Stored size: 320 Bytes
Contents
class ModelGenerator < ::Rails::Generators::NamedBase def create_model_file create_file "app/models/#{file_name}.rb" do <<-eos class #{class_name} < ActiveRecord::Base end eos end end protected def class_name name.camelize end def file_name name.underscore end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active_record_schema-0.5.1 | lib/generators/model_generator.rb |