thoughtbot / ios-on-rails

A guide to building a Rails API and iOS app
Other
76 stars 6 forks source link

Associations missing in User model #106

Open bobcook opened 9 years ago

bobcook commented 9 years ago

The User model is missing some has_many and belongs_to...

Failures:

1) GET /v1/events/:id returns an event by :id Failure/Error: event = create(:event) ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation "events" does not exist LINE 5: WHERE a.attrelid = '"events"'::regclass

jessieay commented 9 years ago

hi Bob! thanks for reporting this.

The book is more of a guide than a tutorial, so not every step of setting up the app is included. That being said, we do not want to leave out important sections that make it confusing to follow.

Would you be able to open a pull request that adds these relationships (and specs for them)? I am thinking we could put it in the appendix and link to it for those who want to be guided through setting up the relationships rather than jumping ahead the API stuff.