devmynd/hstore_accessor — pull request #16 by drock (2014-03-17 00:55:38+00:00)
Title: Correctly interpret booleans set directly in hstore hash

When using the generated accessor methods to set a boolean values, everything is fine because the accessor sets it using a string. However, if you set a boolean using true by directly accessing the hstore hash, a subsequent call to the generated accessor will be incorrect.

Example(Using Product class from specs):
```ruby
p = Product.new
p.options['popular'] = true
p.popular?
```

The last line will return false. This is due to the deserializer directly comparing the boolean value against the string "true".

This patch changes the code to use `ActiveRecord::ConnectionAdapters::Column::TRUE_VALUES` to accept any true value or string representation of it.