Created
January 19, 2011 22:54
-
-
Save victorbstan/787065 to your computer and use it in GitHub Desktop.
Comprehensive list of acceptable values the Rails 3 generator rakes when defining ActiveRecord value 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
| ################################# | |
| Scaffold generator options: | |
| Format: [name, type] | |
| ################################# | |
| # Active Record supports the following types: | |
| :primary_key | |
| :string | |
| :text | |
| :integer | |
| :float | |
| :decimal | |
| :datetime | |
| :timestamp | |
| :time | |
| :date | |
| :binary | |
| :boolean | |
| # Options | |
| [name:string], :null => false | |
| ################################# | |
| Migration file options: | |
| Format: [name, type, options] | |
| ################################# | |
| :name, :datetime | |
| :name, :string | |
| :name, :decimal, :scale=>2, :default=>0, :precision=>8 | |
| [name, type, option 1, option 2, option 3] | |
| ################################# | |
| View form options: | |
| Format: [type, name, options] | |
| ################################# | |
| file_field :name, :title => "Upload new Image" | |
| text_area :name, :rows => 5, :size => "20x40", :value => "Hi, nice site" | |
| check_box | |
| email_field | |
| fields_for | |
| form_for | |
| hidden_field | |
| label | |
| number_field | |
| password_field | |
| radio_button | |
| range_field | |
| search_field | |
| telephone_field | |
| text_field | |
| url_field | |
| #### | |
| If I have left anything out, or made errors email me: victor.stan@gmail.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment