I maintain a few rails apps for my clients (running in production). And sometimes certain bugs occur only for specific users. There are two ways to debug these issues:
- Get the user to show you how the bug occurs
- Try it out by signing into the site as that user
Now option 2 isn’t practical as your users don’t want to share their passwords with you. What I do to get around this fact is test the user interface through rails console
in production. Now, we use devise for authentication so it wasn’t so hard to sign in as the desired user. All you need to run in your production rails console is:
1 | class User |
where User
is your devise model. Now to signin as the desired user (foo@mailinator.com) from the console you run
1 | #to sign in |
Hope that helps
I am currently working on LiveForm which makes
setting up contact forms on your website a breeze.