KaraAJC / karas-pet-shelter

a repository for getting to know Active Record

Home Page:https://bit.ly/so-you-want-to-build-a-thing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pet Shelter

We want to create a pet shelter that holds the following info:

pets name - string req species - string req age - int

owners name - string req email - string

adoptions owner_id integer req pet_id integer req date date req cost integer default=0

STEPS:

Schema

TALK IT OUT!

Then...

$ bundle install
$ rake db:drop APP_ENV=test
$ rake db:create APP_ENV=test

Migrate

$ touch timestamp_create_table.rb
$ rake db:migrate APP_ENV=test

Model

$ touch model.rb

Validate

Associate

Seed

$ rake db:seed APP_ENV=test

Query

$ rake console APP_ENV=test

About

a repository for getting to know Active Record

https://bit.ly/so-you-want-to-build-a-thing


Languages

Language:Ruby 100.0%