albertosaurus/power_enum — pull request #20 by greyblake (2013-05-14 13:29:02+00:00)
Title: Make enumerated models always cache ALL records

Whe Enumerated loads data first time it caches them. And if scope was predefined it caches NOT ALL data, only which are returned.

See specs.

If data is not cached `@all = nil`, the next will cause caching only returned data(IL state).

```
State.where(:state_code => "IL").active
```

I fixed that.

However some proble remains.
`.active` is not a scope, it doesn't return relation and it relies on cached values.
I'd like to prevent those methods to be used as scope, but don't know how.
I opened question about it In StackOverflaw: http://stackoverflow.com/questions/16544217/activerecord-class-methods-without-scoping