Hireology/homework — pull request #18 by bcasci (2014-07-21 21:54:39+00:00)
Title: Homework submission

The answers are divided into folders part_1 and part_2.

Inside part_2/user_roles there are TWO different implementation strategies for this challenge, active_record_variant_1 and activerecord_variant_2. It's just a way to show two different solutions side by side.

I used an in-memory SQLite database, so you wouldn't have to mess with database creations and Attila confirmed that would be OK.

When running the user_role tests don't forget to:

bundle install
bundle exec rake test
(or add binstubs if you prefer)

The variant_1 strategy is explained in:
activerecord_variant_1/lib/models/user.rb

The variant_2 strategy is explained in:
activerecord_variant_2/lib/policies/policy_checker.rb