Skip to main content

Module generators

Module generators 

Source

Modules§

channel
controller
field
Parsing of name:type[:modifier...] field specs passed to the model and scaffold generators (Rails-style), e.g.
generator_gen
job
locale
doido generate locale [code] — a starter i18n locale file (config/locales/<code>.yml, default en), Rails-style.
mailer
migration
migration_support
Shared helpers for emitting SeaORM migration files that call the doido_model::migration builders (create_table, alter_table, drop_table, add_index, …) instead of raw sea-orm boilerplate.
model
new
New application skeleton rendered from embedded files under templates/new/. Placeholders: {doido_name}, {doido_db_url}, {doido_sqlx_feature}, {doido_path} (absolute workspace root captured at compile time, used for local doido-* path dependencies), and the per-crate dependency specs {doido_dep} / {doido_controller_dep} / {doido_model_dep} which render as a local path dep in a workspace build or a crates.io version dep once doido-generators is published (see [doido_dependency]).
resource
doido generate resource — a model + RESTful controller + routes, without views (Rails rails generate resource). It is the API-mode scaffold.
scaffold
storage_adapter
doido generate storage:adapter <Name> — scaffolds a custom storage adapter (an external file-service integration) implementing doido_storage::Service.
storage_install
doido generate storage:install — the active_storage:install analogue.
templates_gen

Functions§

to_pascal
blog_post/blog-postBlogPost.
to_snake
BlogPost/blog-postblog_post.
to_table_name
BlogPost/blog_postblog_posts — the pluralized, snake_cased table name, honouring any custom rules from config/inflection.yaml.