Skip to content

Instantly share code, notes, and snippets.

@sseletskyy
Created July 1, 2013 10:28
Show Gist options
  • Save sseletskyy/5899820 to your computer and use it in GitHub Desktop.
Save sseletskyy/5899820 to your computer and use it in GitHub Desktop.
Rails scaffolding types
Rails scaffolding types
These types are valid since Rails version 2:
string
text (long text, up to 64k, often used for text areas)
datetime
date
integer
binary
boolean
float
decimal (for financial data)
time
timestamp
references
Here is an example of using rails 3.x scaffolding with data types, run from the Rails application root directory:
rails g scaffold Modelname name:string title:string employed_on:date remarks:text
If you want to remove all the generated files, run
'rails destroy scaffold ModelName'.
--skip-stylesheets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment