Sha256: 12266c5275cc687f5b0390e34b318b9c96a2cae53ba06425b76ade18655aff6a
Contents?: true
Size: 550 Bytes
Versions: 3
Compression:
Stored size: 550 Bytes
Contents
require 'generators/toystore' module Toystore module Generators class ModelGenerator < Base argument :attributes, :type => :array, :default => [], :banner => "field:type field:type" check_class_collision class_option :timestamps, :type => :boolean class_option :parent, :type => :string, :desc => "The parent class for the generated model" 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
3 entries across 3 versions & 1 rubygems