You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
joelparkerhenderson
changed the title
Generataors are awesome; can the guides tell us more about them?
Generators are awesome; can the guides tell us more about them?
Dec 21, 2024
Goal: provide users with better website help for Loco generators.
Context: The Loco guide website has help files for models, views,
controllers, etc., but not (yet) for generators. In my opinion,
generators are awesome and are a good way for novices to create Loco
apps quickly and correctly.
loco-rs#1094
This commit is a rough draft of a Loco guide help page. Ideally other
people here can use this as a starting point for adding more help,
better help, good examples, etc.
For me personally, this page as-is (presuming there are no showstopper
errors) would be a big help for teaching Loco to teammates, even given
the page is a rough draft.
I tried to use a similar TOML front matter; please can someone on the
team could proof that?
The Rails guides have a much more sophisticated geneators guide. IMHO
worth a read. In my Rails work, my teams often use custom generators,
and always use custom field types defined in a migration helper class,
such as `email = string(254)` and `latitude = numeric(12,9)`.
with '#' will be ignored, and an empty message aborts the commit. # #
Date: Thu Dec 26 15:43:19 2024 -0800 # # On branch
add-help-for-generators # Changes to be committed: # new file:
docs-site/content/docs/the-app/generators.md #
I see a big opportunity to help new users get productive with Loco by using generators.
Idea 1: new web help page "Generators".
Describe the various generator options, field types, typical examples, etc.
Perhaps link it in the website top nav bar, near the links "Models" and "Controllers"?
Idea 2: append more help to
cargo loco generate scaffold --help
.Describe more generator information, such as generator examples, and especially the possible model field types (e.g. string, int).
AFAICT the field type list will be the same as when I provide a fake type such as
cargo loco generate scaffold --html x x:'x'
The text was updated successfully, but these errors were encountered: