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

Add information about how generators work to the contribution guide #1025

Open
composerinteralia opened this issue Feb 7, 2020 · 1 comment

Comments

@composerinteralia
Copy link
Contributor

composerinteralia commented Feb 7, 2020

Rails generators can be a bit of a mystery for folks unfamiliar with them. While trying to explain to somebody where some of the file manipulation methods come from it took me way too many steps to find the documentation I was hoping for:

  1. The method wasn't defined in the suspenders generator I was looking at, so walked up the inheritance chain to Suspenders::Generators::Base
  2. Not defined there either so continued up inheritance chain and searched for Rails::Generators::Base on https://api.rubyonrails.org/
  3. Not defined there either, but mention of Thor::Actions
  4. Clicked on lots of things to get to relevant thor documentation: https://github.com/erikhuda/thor -> https://github.com/erikhuda/thor/wiki -> https://www.rubydoc.info/github/erikhuda/thor -> https://www.rubydoc.info/github/erikhuda/thor/Thor/Actions

I probably should have gone to https://guides.rubyonrails.org/generators.html instead, but I didn't think of it until after.

Having a couple of links in the contributor guide will hopefully make this easier for my future self, and for others.

cc @fridaland

@stevepolitodesign
Copy link
Contributor

A section has been added about how to test generators, but there's still an opportunity to link to https://guides.rubyonrails.org/generators.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants