Sha256: 05b1eff1ac969d42e2fc4081ab48de2e7173c3dabce679b5d40e36e101d5fe1a

Contents?: true

Size: 449 Bytes

Versions: 5

Compression:

Stored size: 449 Bytes

Contents

require 'rails/generators/named_base'

module FactoryBot
  module Generators
    class Base < Rails::Generators::NamedBase #:nodoc:
      def self.source_root
        @_factory_bot_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'factory_bot', 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

5 entries across 5 versions & 1 rubygems

Version Path
factory_bot_rails-4.11.1 lib/generators/factory_bot.rb
factory_bot_rails-4.11.0 lib/generators/factory_bot.rb
factory_bot_rails-4.10.0 lib/generators/factory_bot.rb
factory_bot_rails-4.8.2 lib/generators/factory_bot.rb
factory_bot_rails-1.0.0.alpha lib/generators/factory_bot.rb