When there's more than one rule pointing to the same action (let's say, a badge and a points rule), and when a target user with no prior reputation triggers both, two sashes are created, and part of the reputation was lost. Reloading the potentially just-created related sash before creating it solves this issue. [fixes #203] [fixes #204]
I want to be able to edit Badge name and descriptions in my database, unfortunately by using a finder which relies on badge name I can’t easily modify badges without using a separate locked db column just to support the merit badge string name id. Since IDs in relational databases aren’t modified it makes more sense to write the rules using attributes that aren’t going to be changing. Merit badges have assigned IDs and already have a finder so I just modified the Rule class a little to support an added `:badge_id` attribute. As it is a single attribute I set the finder to check for it first and use it for finding the badge if it is available, if not the finder falls back to `:find_by_name_and_level` * Added `:badge_id` attribute to `Rule` * Modified badge finder method to prefer `:badge_id` over `:badge_name` and `:level` * Added test for Rule to support modified finder * Added test for dummy app to support modified finder * Documented use in badge rule template * Documented use in README
Makes the badges much nicer on hi-dpi devices (phones, retina MBP). BTW [CodeClimate measures test coverage too](http://blog.codeclimate.com/blog/2013/09/11/test-coverage-and-code-quality-better-together/), so you could move there from coveralls.
…se :change. As described in https://github.com/bbatsov/rails-style-guide#migrations.