remiprev/her — pull request #279 by aauthor (2014-08-11 23:14:01+00:00)
Title: Add resource_class to Her::Model::ORM

# From commit message
Different APIs may have different conventions for searching for relations. For
example, an API may not use query params for `#where` like searches. In these
cases, it might be useful to have a model use a specialized `Relation` class
that contains these rules. This commit adds two methods to `Her::Model::ORM`:

- `.use_relation(klass)` specifies the relation class to be used
- `.relation_class` gets the used relation class

Internally, the ORM module uses the defined relation (defaulting to
`Her::Model::Relation`) for setting up queries.

# PR notes
I put in this logic because I was using a non-Rails API that had quirky conventions. This API did not use query params for `GET /:resource` searches, but instead had a custom resource path to which one `POST`ed a query object. In order to have `Her` accommodate this, I either needed to monkey patch `Her::Model::Relation`, maintain a separate fork of `Her` with a modified `Relation` class, or include this functionality, to set your own relation class (which could inherit `Her::Model::Relation` and only override what it needed to).