Skip to content

Instantly share code, notes, and snippets.

View craigw's full-sized avatar
🦄

Craig R Webster craigw

🦄
View GitHub Profile
<form action="/sandwiches/create">
Name: <input type="text" name="sandwich[name]" />
<input type="submit" value="Save" />
</form>
# Look to see what's been changed
git status
# Stage the models, migrations, schema and tests.
git add app/models/ db/migrate/ db/schema.rb test/
# Commit the changes with a message
git commit -m "Added a model to represent sandwiches."
# Run any pending migrations
rake db:migrate
ruby ./script/generate model Sandwich name:string
# Create the repository
git init
# Add the project to the next commit
git add .
# Commit the changes
git commit -m "Setup a new Rails application."
touch tmp/.gitignore
touch log/.gitignore
.DS_Store
db/*.sqlite3
doc/api
doc/app
log/*.log
tmp/**/*
git config --global user.name "Your Full Name"
git config --global user.email "[email protected]"
cd QuickBite
ruby ./script/server
cd ~/sandbox/
rails QuickBite