jcasimir/draper — Issue #84: Use decorator in Rails routes helpers
Author: niuage
Created: 2011-11-16 19:02:33+00:00
State: open

It's more a question than an issue with draper.

You can use a decorator in rails routes helpers.

event_path(@event) # with @event an EventDecorator

How do you achieve that? I tried to emulate some of the features of draper but can't get that to work.

I have overridden kind_of? in my decorator, since I thought that was the trick, but it doesnt work.
I get `Event(#2226668640) expected, got EventPresenter(#2224112480)`

Could you explain to me how draper does it?

Thanks :)