lockstep/rails_new

Allow delegation/forwarding to other objects besides wrapped

Closed this issue · 0 comments

Right now you can do forward calls to wrapped via ApplicationDecorator::forward. I recently encountered a case in a presenter (which inherits from ApplicationDecorator) where it would be convenient to use forward *methods, to: :elsewhere instead of forwarding them to the wrapped object. In this case I couldn't use delegate on the model level to accomplish the desired forwarding, so I ended up using def_delegators directly. Maybe better if we add an optional to: to the our base decorator forward method?