I am using Ruby on Rails 3.0.7 and I would like to know how to initialize\build “custom” data structures responding to the where method as like it works, for example, for common RoR AssociationCollection objects.
For example:
# The following code should work after build the 'test_data' as well...
# but how to build that?
test_data.where(:test_attribute => 'test_value')
I’m not entirely clear on what you’re after, but you could create a wrapper around (for example) an array of hashes that used
whereto do searching.