active-hash / active_hash

A readonly ActiveRecord-esque base class that lets you use a hash, a Yaml file or a custom file as the datasource
MIT License
1.21k stars 178 forks source link

.where("id>?", 0) not working #176

Closed joshm1204 closed 5 years ago

joshm1204 commented 5 years ago

Does active hash have the ability to search by >, < operators? If not, what is the preferred solution?

syguer commented 5 years ago

It doesn't. Simple solution we known is to use Enumerable#select

okuramasafumi commented 5 years ago

@joshm1204 Hi, ActiveHash where method now takes range argument so you can do something like foo.where(id: 0..Float::Infinity)