From 9aad9ae26f5b25680b83bccbbb7942961ddd8b5f Mon Sep 17 00:00:00 2001 From: Alec Clarke Date: Sat, 27 Apr 2019 10:20:23 -0400 Subject: [ci skip] Update the guide's model generator output. The model generator code sample used in the command line guides was displaying an outdated output for the generator's usage. This change updates the sample to mirror what's currently output when running `$rails generate model`. --- guides/source/command_line.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/guides/source/command_line.md b/guides/source/command_line.md index 4ad143d105..55f8c84b66 100644 --- a/guides/source/command_line.md +++ b/guides/source/command_line.md @@ -238,14 +238,17 @@ Usage: ... -Active Record options: - [--migration] # Indicates when to generate migration - # Default: true +ActiveRecord options: + [--migration], [--no-migration] # Indicates when to generate migration + # Default: true ... Description: - Create rails files for model generator. + Stubs out a new model. Pass the model name, either CamelCased or + under_scored, and an optional list of attribute pairs as arguments. + +... ``` NOTE: For a list of available field types for the `type` parameter, refer to the [API documentation](https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-add_column) for the add_column method for the `SchemaStatements` module. The `index` parameter generates a corresponding index for the column. -- cgit v1.2.3