Timo Schilling
Timo Schilling
this should be handled in the calling code section: ``` ruby cell('...', model, context: option[:context].merge({...})) ```
The problem is that you overwrite the context in your example. You need to merge your `current_user` into the existing context.
``` ruby # wrong = cell(:comment, collection: Comment.recent, context: { current_user: current_user } ) # right = cell(:comment, collection: Comment.recent, context: option[:context].merge(current_user: current_user)) ```
@apotonick There is no performance Problem, if you mean this? If the cell don't include `Cell::Builder`, `build` is just an alias for `new` and calling a alias coast the same...
what's up here?
It is not only an alias, it is also to use Feature::Http on Collections
Why didn't you simply solve your problem by overriding `to_s` on your decorator or using `display_name`. You can use `display_name` as alias to `to_s` on your `ApplicationRecord`.
Are you ok with breaking existing behavior? There are many simple ways to solve your problem without copying code or breaking AA.
I'm talking about define a method on your model or decorator. Your decorator breaks the from AR expected behavior by overwriting AR#to_s