Sha256: 6f969a56c74eea2086e07bdbf4d542df316ef9a972679357fcd0fbbf7b9c6b17
Contents?: true
Size: 433 Bytes
Versions: 2
Compression:
Stored size: 433 Bytes
Contents
module Mongoid class ModelGenerator < Rails::Generators::NamedBase argument :attributes, :type => :array, :default => [], :banner => "field:type field:type" def self.source_root @source_root ||= File.expand_path('../templates', __FILE__) end def create_model_file template 'model.rb', File.join('app/models', class_path, "#{file_name}.rb") end # hook_for :test_framework end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mongo_db_model-0.3.1 | lib/generators/mongoid/model/model_generator.rb |
mongo_db_model-0.3.0 | lib/generators/mongoid/model/model_generator.rb |