Commit Graph

7 Commits

Author SHA1 Message Date
Jason Kotchoff
69d50468cb Expand rails route search to all table content
Expands the search field on the rails/info/routes page to also search:
* Route name (with or without a _path and _url extension)
* HTTP Verb (eg. GET/POST/PUT etc.)
* Controller#Action

because it's not obvious that the search field is currently only
restricted to the route paths.
2023-03-03 17:14:33 +11:00
Jonathan Hefner
25301604b4 Add "Did you mean?" for unrecognized CLI commands
This commit improves the error message that is displayed when a user
specifies an unrecognized `bin/rails` command by offering "Did you
mean?" suggestions.  The suggestions cover all visible commands, and
supersede any incomplete (Rake-task-only) suggestions that Rake might
display.

__Before (example)__

  ```console
  $ bin/rails credentails:edit
  rails aborted!
  Don't know how to build task 'credentails:edit' (See the list of available tasks with `rails --tasks`)

  (See full trace by running task with --trace)

  $ bin/rails --tasks
  ...
  rails cache_digests:dependencies         # Lookup first-level dependencies for TEMPLATE (like messages/show or comments/_comment.html)
  rails cache_digests:nested_dependencies  # Lookup nested dependencies for TEMPLATE (like messages/show or comments/_comment.html)
  rails db:create                          # Creates the database from DATABASE_URL or config/database.yml for the current RAILS_ENV (use ...
  rails db:drop                            # Drops the database from DATABASE_URL or config/database.yml for the current RAILS_ENV (use db...
  ...

  $ bin/rails credentails -h
  # no output

  $ bin/rails credentials -h
  # no output

  $ bin/rails versoin
  rails aborted!
  Don't know how to build task 'versoin' (See the list of available tasks with `rails --tasks`)
  Did you mean?  db:version

  (See full trace by running task with --trace)
  ```

__After (example)__

  ```console
  $ bin/rails credentails:edit
  Unrecognized command "credentails:edit" (Rails::Command::UnrecognizedCommandError)
  Did you mean?  credentials:edit

  $ bin/rails credentails -h
  Unrecognized command "credentails" (Rails::Command::UnrecognizedCommandError)
  Did you mean?  credentials:diff

  $ bin/rails credentials -h
  Unrecognized command "credentials" (Rails::Command::UnrecognizedCommandError)
  Did you mean?  credentials:diff

  $ bin/rails versoin
  Unrecognized command "versoin" (Rails::Command::UnrecognizedCommandError)
  Did you mean?  version
  ```
2023-01-31 16:01:39 -06:00
Lachlan Sylvester
e1258f74c0 use lower case for codespell ignore words 2023-01-24 09:59:56 +11:00
Rafael Mendonça França
c376bb7d0f
Allow trix content 2023-01-23 19:04:28 +00:00
Marco Roth
0f6575a534 Migrate Rails Guides from Turbolinks to Turbo 2022-10-17 22:07:33 +02:00
Petrik
f9b234e022 Fix misspelling of value is tests 2022-02-15 14:50:33 +01:00
John Bampton
6e85b6b86e Add spell checking with codespell as a GitHub Action
`codespell` works with a small custom dictionary and seems to find perhaps more spelling mistakes than `misspell` which really only fixes commonly misspelled English words.

Not all spell checkers can check all file types and most spell checkers can't find all the errors.

https://github.com/codespell-project/codespell
https://pypi.org/project/codespell/
2021-05-04 14:46:21 +10:00