Class: FactoryBot::Generators::Base
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- FactoryBot::Generators::Base
- Defined in:
- lib/generators/factory_bot.rb
Overview
:nodoc:
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
6 7 8 |
# File 'lib/generators/factory_bot.rb', line 6 def self.source_root @_factory_bot_source_root ||= File.(File.join(File.dirname(__FILE__), 'factory_bot', generator_name, 'templates')) end |
Instance Method Details
#explicit_class_option ⇒ Object
10 11 12 |
# File 'lib/generators/factory_bot.rb', line 10 def explicit_class_option ", class: '#{class_name}'" unless class_name == singular_table_name.camelize end |