Sha256: 2de3e04bd0b68efae5f7b3644073efa80c3e123d73ab2912100c42c1532bd7a0
Contents?: true
Size: 647 Bytes
Versions: 6
Compression:
Stored size: 647 Bytes
Contents
# encoding: utf-8 module MongoMapper module Generators class ModelGenerator < Rails::Generators::NamedBase desc 'Creates a mongomapper model' argument :name, :type => :string argument :attributes, :type => :array, :default => [], :banner => "field:type field:type" class_option :timestamps, :type => :boolean check_class_collision 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 end
Version data entries
6 entries across 6 versions & 3 rubygems