objects-on-rails/display-case — pull request #18 by avdi (2012-10-14 17:21:38+00:00)
Title: Consider context when determining applicability

Hi folks,

I hate to submit an incomplete pull request like this, but I don't know when I'll have time to flesh it out and maybe someone else has time to look at it in the meanwhile.

I realized while pairing with Vlad Ivanovic that DisplayCase doesn't have the ability to take into account the context (e.g. Controller) when deciding if an exhibit is applicable. Which gets in the way of adding exhibits that are applicable only when, e.g., the current user is the owner of the resource.

The changes here were enough to get things working for the project we paired on, but they almost certainly break tests as well as backwards compatibility.

Feel free to punt this back into my court if you don't have any time.