-- Leo's gemini proxy

-- Connecting to freeshell.de:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-GB

rails generate


> Generate new Rails templates in an existing project.

More information.


List all available generators:

rails generate

Generate a new model named Post with attributes title and body:

rails generate model {Post} {title:string} {body:text}

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

rails generate controller {Posts} {index} {show} {new} {create}

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

rails generate migration {AddCategoryToPost} {category:string}

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

rails generate scaffold {Post} {title:string} {body:text}


> Copyright © 2014—present the tldr-pages team and contributors.

> This work is licensed under the Creative Commons Attribution 4.0 International License (CC-BY).

CC-BY



-- Response ended

-- Page fetched on Tue May 21 01:08:14 2024