Add dynamic-assignment of badges

Squashed commit of the following:

commit 94bfea1ef12e2bdfcc114b563a71992c05a17712
Author: Josh McArthur <joshua.mcarthur@gmail.com>
Date:   Tue Sep 11 08:49:52 2012 +1200

    Remove Game#search action

commit 308f1e2a00b2383d5a7440c707d9d43724ef8312
Merge: 72166d5 be8d57a
Author: Josh McArthur <joshua.mcarthur@gmail.com>
Date:   Tue Sep 11 08:44:31 2012 +1200

    Merge branch 'master' into bretman-master

    Conflicts:
    	db/schema.rb

commit 72166d533a374dd5d18b5894fab5c1e25fa55245
Merge: 91dd2ea 7917f73
Author: Josh McArthur <joshua.mcarthur@gmail.com>
Date:   Tue Sep 11 08:42:14 2012 +1200

    Merge branch 'master' of https://github.com/bretman/Latter into bretman-master

commit 91dd2ea5491c28e90bfd70bedcd6e11ba6c335e7
Merge: 5b534b0 b0763d3
Author: Josh McArthur <joshua.mcarthur@gmail.com>
Date:   Mon Sep 10 20:40:52 2012 +1200

    Merge branch 'master' of https://github.com/bretman/Latter into bretman-master

commit 7917f73ece97399db45da000f15a830f533dea7d
Author: Bret Richdale <bret@3months.com>
Date:   Fri Sep 7 16:25:43 2012 +1200

    Fixes for the pull request

commit b25d9d673d14eee1062da50fb00306cfd9702dfa
Author: Bret Richdale <bret@3months.com>
Date:   Thu Sep 6 09:07:43 2012 +1200

    Resolve missing migrations

commit b0763d3d1fdbaf9b7dd33dbb69de90f9f3162d05
Author: Bret Richdale <bret@3months.com>
Date:   Wed Sep 5 19:23:44 2012 +1200

    Removed route for test games search page

commit 848f9494cea2180c7aeb1089585036a3a6a9b0d5
Merge: 71eeaaa b32d815
Author: Bret Richdale <bret@3months.com>
Date:   Wed Sep 5 19:18:51 2012 +1200

    Merge branch 'master' into add-badges-brr

commit b32d815805eaf134eb5662fd149bc5d90f0e2853
Merge: a33f53c 255ee57
Author: Bret Richdale <bret@3months.com>
Date:   Wed Sep 5 19:18:13 2012 +1200

    Merge https://github.com/joshmcarthur/Latter

commit 71eeaaa87257b1b4584c15eab4c55e8fb66d9b81
Author: Bret Richdale <bret@3months.com>
Date:   Wed Sep 5 19:15:06 2012 +1200

    Badges now complete including assignment, optional duplication, award dates and expiry periods

commit d449efb3e5e5beb0648cbca7e3d519deed91b50f
Author: Bret Richdale <bret@3months.com>
Date:   Tue Sep 4 08:04:36 2012 +1200

    Added field sfor expiry offset and date but not yet fully implemented

commit 3f754de56bce54dfd47145829c5ca1e4d05d1bb6
Author: Bret Richdale <bret@3months.com>
Date:   Mon Sep 3 18:51:29 2012 +1200

    Fix to badge assignment - duplicate flag and auto awarding is working

commit d4c7572a3ec8615db4a6a776469876c65b3013b8
Author: Bret Richdale <bret@3months.com>
Date:   Mon Sep 3 18:34:09 2012 +1200

    Added check for duplicate badges and associated test

commit 3ec4169a0a7b1bdcaf70530d772e11ae68314a7c
Author: Bret Richdale <bret@3months.com>
Date:   Mon Sep 3 17:58:48 2012 +1200

    Changed award_date to datetime

commit fd59d4fe8b78ff30b723185e184d83c9247b53b1
Author: Bret Richdale <bret@3months.com>
Date:   Mon Sep 3 08:15:40 2012 +1200

    Fixed award! method on Badge, and working on test for correct award_date signing on Badge model spec.

commit b288787cbea47a59d59712e985325be270d1ee46
Author: Bret Richdale <bret@3months.com>
Date:   Fri Aug 31 21:43:50 2012 +1200

    Refactored badge awarding to use player.badges << badge which works now

commit 9f01d35d52b4d62766cfb82e16ea610035fa7314
Author: Bret Richdale <bret@3months.com>
Date:   Fri Aug 31 08:12:20 2012 +1200

    Badge date offset working, but badge assignment is always assigning the incorrect badge

commit 0f8481b4a89f152c9afef1ad660c159a566d9e27
Author: Bret Richdale <bret@3months.com>
Date:   Tue Aug 28 08:19:20 2012 +1200

    Got the test search form working, but maybe not when the query string is blank

commit 0c388cbd8a3a4bbc61f35c31616bac121d7ee27d
Author: Bret Richdale <bret@3months.com>
Date:   Mon Aug 27 08:13:30 2012 +1200

    Getting the ransack search test form working

commit 5afaf32ff62697af1f22c9f045a831109120be27
Author: Bret Richdale <bret@3months.com>
Date:   Fri Aug 24 08:13:21 2012 +1200

    Added a search to games to test the ransack search parameters games/search

commit a33f53c04efb6542e0802e63297605e77995e724
Merge: f9aa9b4 1e26c56
Author: Bret Richdale <bret@3months.com>
Date:   Thu Aug 23 18:26:16 2012 +1200

    more fixes

commit 1e26c5633f13416d0d4637b4dc484cb55a8860eb
Author: Bret Richdale <bret@3months.com>
Date:   Thu Aug 23 18:25:00 2012 +1200

    Fixed game model conflicts from merge

commit f9aa9b440f0088013ac6497f60182bdfe50e4482
Merge: e575d63 eed8444
Author: Bret Richdale <bret@3months.com>
Date:   Thu Aug 23 16:43:13 2012 +1200

    Merge branch 'master' into add-badges-brr

commit e575d63ddfbbfb37989f5627231335e2eb192f02
Author: Bret Richdale <bret@3months.com>
Date:   Thu Aug 23 16:43:09 2012 +1200

    Rolling in changes

commit eed8444e53966fb943243bf4b424484f76027cfe
Merge: 0533a5a eb9629e
Author: Bret Richdale <bret@3months.com>
Date:   Thu Aug 23 16:36:40 2012 +1200

    Merge https://github.com/joshmcarthur/Latter

commit 0533a5a42919faaa9ff95a176a99f11e02393f00
Merge: f13f0ac 3a3dc74
Author: Bret Richdale <bret@3months.com>
Date:   Tue Aug 21 07:54:57 2012 +1200

    Fixed conflicts

commit 3a3dc742bd0bc1536573d4e014cf97d39eee48b1
Author: Bret Richdale <bret@3months.com>
Date:   Tue Aug 21 07:50:49 2012 +1200

    Fixing the award badges function

commit f37f4e21de4a5647c2353f46d91e3c4142033ed1
Author: Bret Richdale <bret@3months.com>
Date:   Mon Aug 20 08:17:44 2012 +1200

    Added initial implementation of function to test all badges on game commit

commit 686351145e53e2f31d61b36e61580587cc277e0d
Author: Bret Richdale <bret@3months.com>
Date:   Fri Aug 17 08:05:34 2012 +1200

    Added count based award conditions and tests

commit 53a5cf7a2628e68d45ec0a59e3cc3e529f9fd0a0
Author: Bret Richdale <bret@3months.com>
Date:   Thu Aug 16 18:38:22 2012 +1200

    Got the search condition and test working on Badge

commit ea7f8ecd2b4dc182c64b863d2ad60a67f75e4d85
Author: Bret Richdale <bret@3months.com>
Date:   Mon Aug 13 08:08:17 2012 +1200

    Moved awarded_to? test to the model spec

commit f6c745cbbe96fd8098b0d07921b985afbc330cf0
Author: Bret Richdale <bret@3months.com>
Date:   Fri Aug 10 08:10:43 2012 +1200

    Added an awarded_to method on Badge along with matching test

commit 68222a19612aaa197ff18d63e7e4ec9967aaddd3
Author: Bret Richdale <bret@3months.com>
Date:   Thu Aug 9 08:10:28 2012 +1200

    Added a condition field to Badges, added a show method to Badges, working on the conditional being displayed in the show