Closed Dainii closed 1 year ago
Hello, thanks for reporting. I'm trying to find a scenario in which the association would not be defined, but I'm not coming up with anything concrete. Any chance you could reproduce it in a fresh Rails app that you can share?
Hello, thank you for the answer.
I created a rails app here. You just need to copy the /.env.exampe to /.env and set the discord client id and secret to test.
With this setup, I am able to login through discord, the account is created, the account_identities
entry too, but i'm still not able to call the .identities
relation.
There was a mistake in the association registration, so it never worked 🙈 In the rodauth-demo-rails app it only worked because there was a leftover has_many :identities
association defined from when the OmniAuth integration was implemented manually. I fixed it now and released a new version.
Hello @janko Thank you for this ;)
Hello,
With my current project, the
identities
association does not work, but the rest of the authentication works like a charm, and the entry in theaccount_identities
table is present.Version info:
Account model
When I try to access the identities through
Account.first.identities
, I gotI put a debug string after this line to be sure that
if defined?(Rodauth::Model)
is true and that's the case.Other association like
verification_key
works fine.