Add Votes migration file

Add a 'votes' table and a rating table to the database. Votes have two
owners: an idea and a user each referenced by their respective ID's.
Run Votes migration to update DB schema
Add Idea-Vote-User relationships to models
Add destroy dependecies for Ideas/Users + Votes

If a user or an idea is destroyed, delete all of its associated votes
as well.
Add Vote member routes to Idea routes

Creation, updating, and deletion of Votes will be handled in the Idea
controller. Currently, all these routes point to the same action.
Add 'vote' action to Idea controller

Add a base action and strong parameters requirements for handling
votes in the Ideas controller.
Change Idea controller comments to match routes
Add 'composite_primary_keys gem'

Rails doesn't support compiste primary keys by default. Use this gem to
create a composite key for Votes with the 'user_id' and 'idea_id'
fields. This will allow the default 'id' field to be ignored since it
won't be used to uniquely identify Vote records.
Add primary keys to Vote model

Specify the 'idea_id' and 'user_id' attributes are to be used as unique
primary keys. Records will be uniquely identified by this composite
key, not the 'id' field created and used by Rails by default.
Create Votes factory for specs

Factory only generates a number for the 'value' attribute. The factory
randomly chooses '-1' or '1' as a value for each vote record
generated.
Create a failing test for Vote model

Votes go against the pattern and don't use the 'id' field as the
primary key by default. Votes require a composite primary key, but
without the 'composite_primary_key' gem and the attributes specified
in the Vote model, testing produced

     'undefined method `to_sym' for nil:NilClass'

errors when trying to validate the test vote records. With the gem
added, test now run into

     TypeError:
       Cannot visit Idea

when executing

     'vote = create(:vote, idea_id: idea.id, user_id: user.id)'
Create a new migration for the Votes table

Migration will recreate the votes table with the default 'id' field and
index over the 'id's of the associated ideas and users.
Run the Votes migration to recreate the table
Add more specific tests to Vote model spec

Test the validity of new votes:
   * Records with valid keys
   * Records with duplicate keys of another record
   * Records without a 'user_id'
   * Records without an 'idea_id'
Specify Vote foreign keys in Idea/User models

Specify the fields used as foreign keys in Vote records.
Fix Vote model validations

Vote records should have a 'value' and a unique 'user_id, idea_id' key.
Votes use the 'composite_primary_keys' gem to allow the use of two
fields as a composite key in the database in place of the default 'id'
fields Rails uses.
Revert changes made to database

Revert the changes to the Votes table made in commits a02a838..8271f73.
Update IdeaController spec pending test messages

Add messages for each individual test that can be added.
Add indeces to Votes table

Votes table has indeces 'user_id' and 'idea_id.'
Change response expectation syntax in Idea Controller

Follow expectation syntax convention as in other tests.