Skip to content

Use resource_name instead of resource object#114

Merged
RenzoMinelli merged 5 commits intomasterfrom
rm/stop-requiring-resource
Feb 6, 2026
Merged

Use resource_name instead of resource object#114
RenzoMinelli merged 5 commits intomasterfrom
rm/stop-requiring-resource

Conversation

@RenzoMinelli
Copy link
Copy Markdown
Contributor

@RenzoMinelli RenzoMinelli commented Feb 2, 2026

Use resource_name instead of resource object as this is a non authenticated controller. We still need the resource name to correctly generate the path and the dynamic method we made supports both a resource and a scope

@RenzoMinelli RenzoMinelli marked this pull request as ready for review February 3, 2026 17:45
Comment thread lib/devise/webauthn/helpers/credentials_helper.rb Outdated
@RenzoMinelli RenzoMinelli force-pushed the rm/stop-requiring-resource branch from 684d416 to 8573aa9 Compare February 5, 2026 14:09
@@ -1,4 +1,4 @@
<%= passkey_creation_form_for(resource) do |form| %>
<%= passkey_creation_form_for(resource_name) do |form| %>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For these views that are included in the gem we still need to get the resource name from the view

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense because on our views we are sure that we are in Devise context so resource should be available

Comment thread lib/devise/webauthn/helpers/credentials_helper.rb Outdated
Comment thread lib/devise/webauthn/helpers/credentials_helper.rb Outdated
Comment thread lib/devise/webauthn/helpers/credentials_helper.rb Outdated
Comment thread lib/devise/webauthn/helpers/credentials_helper.rb Outdated
Comment thread lib/devise/webauthn/helpers/credentials_helper.rb Outdated
Comment thread lib/devise/webauthn/helpers/credentials_helper.rb Outdated
Comment thread lib/devise/webauthn/helpers/credentials_helper.rb Outdated
@RenzoMinelli RenzoMinelli merged commit 468c637 into master Feb 6, 2026
49 of 50 checks passed
@RenzoMinelli RenzoMinelli deleted the rm/stop-requiring-resource branch February 6, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants