Rails generate commands

suggest change

Versions

[{“Name”:“5.0”,“GroupName”:null}]

Introduction

Usage: rails generate GENERATOR_NAME [args] [options].

Use rails generate to list available generators. Alias: rails g.

Parameters

|Parameter|Details| |———|—––| |-h/--help|Get help on any generator command| |-p/--pretend|Pretend Mode: Run generator but will not create or change any files| |field:type|‘field-name’ is the name of the column to be created and ‘type’ is the data-type of column. The possible values for ‘type’ in field:type are given in the Remarks section.|

Remarks

The possible values for ‘type’ in field:type are:

Data Type | Description | —— | —— |:string | For smaller pieces of text (usually has a character limit of 255) |:text | For longer pieces of text, like a paragraph |:binary | Storing data including images, audios and videos |:boolean | Storing true or false values |:date | Only the date |:time | Only the time |:datetime | Date and time |:float | Storing floats without precision |:decimal | Storing floats with precision |:integer | Storing whole numbers |

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Rails generate commands:
*Rails generate commands

Table Of Contents
14Rails generate commands
55CSV