CmdID

CmdID / Commands

rails-generate

Generate new Rails templates in an existing project. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

List all available generators

rails generateIdentify

Generate a new model named Post with attributes title and body

rails generate model Post title:string body:textIdentify

Generate a new controller named Posts with actions index, show, new, and create

rails generate controller Posts index show new createIdentify

Generate a new migration that adds a category attribute to an existing model called Post

rails generate migration AddCategoryToPost category:stringIdentify

Generate a scaffold for a model named Post, predefining the attributes title and body

rails generate scaffold Post title:string body:textIdentify