We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
👋 What's the convention for accessing model classes that are namespaces?
For example; I have Administrator and Administrator::Passkey as 2 ActiveRecord models.
Administrator
Administrator::Passkey
(rdbg) administrators #<struct Oaken::Stored::ActiveRecord type= Administrator(id: integer, email: string, webauthn_id: string, sign_in_count: integer, current_sign_in_at: datetime, last_sign_in_at: datetime, current_sign_in_ip: string, last_sign_in_ip: string, created_at: datetime, updated_at: datetime), key="administrators"> (ruby) administrator_passkeys eval error: undefined local variable or method `administrator_passkeys' for Oaken::Seeds:Module /Users/tcannon/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/oaken-0.5.0/lib/oaken/seeds.rb:14:in `method_missing' (rdbg)/db/seeds/administrators/default.rb:1:in `block in load_onto' nil
Thanks!
The text was updated successfully, but these errors were encountered:
Super interested in this as well!
Sorry, something went wrong.
Ah yeah, I just told @tcannonfodder privately and forgot to reply here.
Right now, you have to call register Administrator::Passkey because we don't auto-detect namespaces.
register Administrator::Passkey
So we could use documentation for this, until I get to the auto-detection.
Oh and I recommend calling register in Oaken.prepare in db/seeds.rb.
register
Oaken.prepare
Just auto-fixed this in #83.
No branches or pull requests
👋 What's the convention for accessing model classes that are namespaces?
For example; I have
Administrator
andAdministrator::Passkey
as 2 ActiveRecord models.Thanks!
The text was updated successfully, but these errors were encountered: