Skip to content

Instantly share code, notes, and snippets.

@SpencerCDixon
Created March 26, 2015 17:36
Show Gist options
  • Save SpencerCDixon/2177df1c1ac0ec9f0f84 to your computer and use it in GitHub Desktop.
Save SpencerCDixon/2177df1c1ac0ec9f0f84 to your computer and use it in GitHub Desktop.
Globo Gym Challenge - Part 2

Globo Gym Challenge - Part 2

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment