ankane/pretender

Pretender does not work correctly with cells gem

okanisildar opened this issue · 1 comments

Hello!

We're using this gem for a while and it is so helpful for us but, currently I am facing an issue. We implemented cells to our project (you can see the gem here: https://github.com/trailblazer/cells) and pretender does not work inside of cells. Cells get current_user (thanks to devise gem) as the real user, not as the user that I want to pretend.

I can pass the current_user to the cell as options but this is not the way I want to solve it because I have lots of cells. I am looking for a solution that I can implement into a class that I call BaseCell. I am inheriting BaseCell into my Cells.

Is there anyone who is facing a similar issue or do you have any suggestions for me?

Hey @okanisildur, I haven't worked with the cells gem before, but please post back if you figure it out.