gonzalo-bulnes / simple_token_authentication

Simple (and safe*) token authentication for Rails apps or API with Devise.
GNU General Public License v3.0
1.51k stars 238 forks source link

Use 'exists?' instead of 'count' to checking exists token #339

Closed Mraky09 closed 1 year ago

Mraky09 commented 6 years ago

@gonzalo-bulnes Please review it for me 😆

gonzalo-bulnes commented 1 year ago

Hi @Mraky09,

This syntax was intentional, because it enabled some extra backwards compatibility. That being said, if you update this branch to include the latest changes in master, you'll see the result of the entire tests suite. If everything runs successfully, I see no reason not to include you change :slightly_smiling_face:

gonzalo-bulnes commented 1 year ago

Here is the reasoning for using count instead of exists?: https://github.com/gonzalo-bulnes/simple_token_authentication/commit/f5bcec151d63b6067c3f31d67a2208ad5ea8b9fc