Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation to fix Rubocop errors in 'rails generate' command #977

Merged
merged 1 commit into from
Apr 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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