drapergem/draper — pull request #478 by haines (2013-02-17 17:16:48+00:00)
Title: Accept a lambda for context in factory

Like `decorates_association`, you can now pass a context lambda to `decorates_assigned`, which receives the current controller instance and returns a hash:

```ruby
class ArticleController < ApplicationController
decorates_assigned :article, context: ->(controller){ {user: controller.current_user} }
end
```

Closes #467