Skip to content

Commit

Permalink
Merge pull request #977 from tmaier/generator-2
Browse files Browse the repository at this point in the history
Update documentation to fix Rubocop errors in 'rails generate' command
  • Loading branch information
koic committed Apr 13, 2023
2 parents 73fd423 + f5c9e30 commit 96821da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ your config/application.rb to apply RuboCop autocorrection to code generated by
module YourCoolApp
class Application < Rails::Application
config.generators.after_generate do |files|
system("bundle exec rubocop -A --fail-level=E #{files.shelljoin}", exception: true)
parsable_files = files.filter { |file| file.end_with?('.rb') }
system("bundle exec rubocop -A --fail-level=E #{parsable_files.shelljoin}", exception: true)
end
end
end
Expand Down
3 changes: 2 additions & 1 deletion docs/modules/ROOT/pages/usage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ your config/application.rb to apply RuboCop autocorretion to code generated by `
module YourCoolApp
class Application < Rails::Application
config.generators.after_generate do |files|
system("bundle exec rubocop -A --fail-level=E #{files.shelljoin}", exception: true)
parsable_files = files.filter { |file| file.end_with?('.rb') }
system("bundle exec rubocop -A --fail-level=E #{parsable_files.shelljoin}", exception: true)
end
end
end
Expand Down

0 comments on commit 96821da

Please sign in to comment.