Sha256: 9959369ecc07f3aa4462c1f17b600e8697fba2b4ca98cfcb523ce2caec653caf
Contents?: true
Size: 605 Bytes
Versions: 2
Compression:
Stored size: 605 Bytes
Contents
require 'generators/fabrication' module Fabrication module Generators class ModelGenerator < Base argument :attributes, :type => :array, :default => [], :banner => "field:type field:type" class_option :dir, :type => :string, :default => "test/fabricators", :desc => "The directory where the blueprints should go" class_option :extension, :type => :string, :default => "rb", :desc => "file extension name" def create_fabrication_file template 'fabricator.rb', File.join(options[:dir], "#{table_name}.#{options[:extension].to_s}") end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rails3-generators-0.15.0 | lib/generators/fabrication/model/model_generator.rb |
rails3-generators-0.14.0 | lib/generators/fabrication/model/model_generator.rb |