remiprev/her — pull request #51 by simonc (2012-11-22 17:30:18+00:00)
Title: Models should implement [] and has_key?

Here is a use case I just ran into:

``` ruby
# Given Article is a Her model
article = Article.find(42)

Mustache.render "title is {{title}}", article
```

Under the hood, mustache call `has_key?` and `[]` on the passed object.

I managed to make it work with a little path I'm gonna test and add a PR for.
Since AR models implement thos two methods, I think 4 lines of code are not a big deal to have it working :)