ankane / pretender

Log in as another user in Rails

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pretender does not work correctly with cells gem

okanisildar opened this issue · 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.