Created
October 19, 2017 07:40
-
-
Save Sanix-Darker/a804ac2ddeb786d3aee08a1045775df4 to your computer and use it in GitHub Desktop.
[SHELL] Helpfull rails commands
This file contains 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
#basics: | |
rails console | |
rails server | |
rake | |
rails generate | |
rails dbconsole | |
rails new app_name | |
#create scaffold | |
rails generate scaffold level | |
#destroy scaffold | |
rails destroy scaffold level | |
#add collum | |
rails generate migration AddListIdColumnToIdeas list_id:integer | |
#add migrations | |
rake db:migrate | |
#revoke migration | |
rake db:revoke | |
rake db:rollback | |
#To have the rails console: | |
rails console | |
>> User.destroy(1) | |
>> User.find(1) | |
ActiveRecord::RecordNotFound: Could not find User with id=1 | |
>> exit | |
... And so on, Awesome tuto here: http://blog.teamtreehouse.com/introduction-rails-command |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice nice!!