Created
July 1, 2013 10:28
-
-
Save sseletskyy/5899820 to your computer and use it in GitHub Desktop.
Rails scaffolding types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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