Sha256: 25d2fea6b64c6b1984441b54aa14a3d4208ec2c67f8c672035d64fa028667af4

Contents?: true

Size: 452 Bytes

Versions: 9

Compression:

Stored size: 452 Bytes

Contents

require 'rails/generators/named_base'

module FactoryGirl
  module Generators
    class Base < Rails::Generators::NamedBase #:nodoc:
      def self.source_root
        @_factory_girl_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'factory_girl', generator_name, 'templates'))
      end

      def explicit_class_option
        ", class: '#{class_name}'" unless class_name == singular_table_name.camelize
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 4 rubygems

Version Path
ffactory_girl_rails-4.8.3 lib/generators/factory_girl.rb
ffactory_girl_rails-4.8.2 lib/generators/factory_girl.rb
factory_girl_rails-4.9.0 lib/generators/factory_girl.rb
ffactory_girl_rails-4.8.0 lib/generators/factory_girl.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/factory_girl_rails-4.8.0/lib/generators/factory_girl.rb
factory_girl_rails-4.8.0 lib/generators/factory_girl.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/factory_girl_rails-4.7.0/lib/generators/factory_girl.rb
factory_girl_rails-4.7.0 lib/generators/factory_girl.rb
factory_girl_rails-4.6.0 lib/generators/factory_girl.rb