diff options
author | Alec Clarke <aclar093@uottawa.ca> | 2019-04-27 10:20:23 -0400 |
---|---|---|
committer | Alec Clarke <aclar093@uottawa.ca> | 2019-04-27 10:32:48 -0400 |
commit | 9aad9ae26f5b25680b83bccbbb7942961ddd8b5f (patch) | |
tree | 40f064152f5b1259d4e712a554a6dcdfe2d69c07 /guides | |
parent | 99df469ddc3dc4be611f4a17f76d14af9ab01bbd (diff) | |
download | rails-9aad9ae26f5b25680b83bccbbb7942961ddd8b5f.tar.gz rails-9aad9ae26f5b25680b83bccbbb7942961ddd8b5f.tar.bz2 rails-9aad9ae26f5b25680b83bccbbb7942961ddd8b5f.zip |
[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`.
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/command_line.md | 11 |
1 files 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. |