Refer back to Globo Gym challenge part 1 for reference
Now that we have spent some time thinking about how we are going to model Globo's new gym application its time to start building it in Rails. In order to get started we will use the make_it_so gem in order to get user authentication for free. make_it_so rails globo_gym
to get the rails app going
The first feature we will build is the ability to create new gym locations. Here are the different fields we will want on a gym location:
- name
- street
- state
- zipcode
- founding_date
- phone_number
- member_count
Gyms won't be associated with users. When building this app make sure to do TDD. Write your tests FIRST before writing any code to make it pass. Here are the user stories to get you going:
As a visitor
I want to view a list of all gyms
So that I can see which one looks like a good fit.
As a visitor
I want to view a specific gyms details
So that I can learn more about it
As a user
I want to be able to create a gym
So that I can start advertising it
As a user
I want to be able to edit a gym's details
So that I can update phone numbers if they change
Extra Credit: Instead of just authorizing for a user to be signed in to create gyms, make it so only Admins can create gyms. In order to do that you will have to write a migration to add some sort of admin column on the user table you are already given with Make_it_so.