Changing the process of name selection for factory defining
Example:
rails g model UserMedia filename:string --force-plural
...
invoke factory_bot
create spec/factories/user_media.rb
it generates the correct factory naming:
FactoryBot.define do
factory :user_media do
filename { "MyString" }
end
end
Fixes: #356
* Address todos generated by rubocop for files in the lib/generators directory.
This partially addresses #293. Since rubocop generated quite a few todos, the commits addressing them are split up into a few different PRs that cover different files.
* Fix underscore seperator in model_generator.rb, and change memoized instance variable name to @_source_root in lib/generators/factory_bot.rb
* get rid of memoized _source_root variable
* get rid of extraneous rubocop rules