assaf/vanity — Issue #80: Metrics Values are Always 0 with mysql (AR Adapter)
Author: mattsmith
Created: 2011-10-28 21:33:25+00:00
State: open

So I setup Vanity to track some basic metrics initially, e.g. how many comments, registrations, etc... overtime. My Metrics look like this, nothing complex:

```ruby
metric "Comments" do
model Comment
end
```

I'm using rails 3.0 and mysql (ActiveRecord not Redis adapter). On the Vanity Dashboard, I receive all 0s for every date even though I know there has been comments in my test data in the last 90 days.

I've identified the issue to be with the Active Record Adapter implementation of the method metric_values @ https://github.com/assaf/vanity/blob/master/lib/vanity/adapters/active_record_adapter.rb#L121

I'm working on a fix, just curious if anyone else has had this issue and if there is already a fix out there.