Sha256: b8e7f7d4e3843d81fd5dcdda7165c2ba3e14c0436c11153d9da822b18324934b

Contents?: true

Size: 473 Bytes

Versions: 17

Compression:

Stored size: 473 Bytes

Contents

require 'generators/factory_girl'

module FactoryGirl
  module Generators
    class ModelGenerator < Base
      argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
      class_option :dir, :type => :string, :default => "test/factories", :desc => "The directory where the factories should go"
      
      def create_fixture_file
        template 'fixtures.erb', File.join(options[:dir], "#{table_name}.rb")
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 3 rubygems

Version Path
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/factory_girl_rails-4.1.0/lib/generators/factory_girl/model/model_generator.rb
factory_girl_rails-4.1.0 lib/generators/factory_girl/model/model_generator.rb
factory_girl_rails-4.0.0 lib/generators/factory_girl/model/model_generator.rb
factory_girl_rails-4.0.0.rc1 lib/generators/factory_girl/model/model_generator.rb
factory_girl_rails-3.6.0 lib/generators/factory_girl/model/model_generator.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/factory_girl_rails-3.2.0/lib/generators/factory_girl/model/model_generator.rb
factory_girl_rails-3.5.0 lib/generators/factory_girl/model/model_generator.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/factory_girl_rails-3.2.0/lib/generators/factory_girl/model/model_generator.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/factory_girl_rails-3.2.0/lib/generators/factory_girl/model/model_generator.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/factory_girl_rails-3.2.0/lib/generators/factory_girl/model/model_generator.rb
rails-uploader-0.0.4 vendor/bundle/ruby/1.9.1/gems/factory_girl_rails-3.2.0/lib/generators/factory_girl/model/model_generator.rb
factory_girl_rails-3.4.0 lib/generators/factory_girl/model/model_generator.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/factory_girl_rails-3.2.0/lib/generators/factory_girl/model/model_generator.rb
rails-uploader-0.0.1 vendor/bundle/ruby/1.9.1/gems/factory_girl_rails-3.2.0/lib/generators/factory_girl/model/model_generator.rb
factory_girl_rails-3.3.0 lib/generators/factory_girl/model/model_generator.rb
factory_girl_rails-3.2.0 lib/generators/factory_girl/model/model_generator.rb
factory_girl_rails-3.1.0 lib/generators/factory_girl/model/model_generator.rb