janko / rodauth-rails

Rails integration for Rodauth authentication framework
https://github.com/jeremyevans/rodauth
MIT License
599 stars 40 forks source link

undefined method `-@' for :id:Symbol #24

Closed KoellM closed 3 years ago

KoellM commented 3 years ago

Can't call model method after logged in. error: undefined method `-@' for :id:Symbol

This error only occurs when using MySQL https://github.com/KoellM/RodauthTest/actions/runs/475719274

Test: https://github.com/KoellM/RodauthTest/blob/main/test/integration/rodauth_test.rb

Error occurred since rodauth-0.3.1(sequel-activerecord_connection ~>1.0) If use rodauth-0.3.0(sequel-activerecord_connection ~>0.3), no this error.

janko commented 3 years ago

Thanks for reporting. I've just released sequel-activerecord_connection 1.2.1 with a fix for this issue. I've confirmed that the tests in your repository pass with this fix.

janko commented 3 years ago

I've also released sequel-activerecord_connection 1.2.2 which fixes this same error if performing an Active Record inside a Sequel transaction (most Rodauth before/after hooks run inside a Sequel transaction).