Skip to content

Commit

Permalink
refactor token_for definition
Browse files Browse the repository at this point in the history
  • Loading branch information
ElviaBth committed Jul 15, 2024
1 parent ea6051d commit d3e8266
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def new
end

def create
@form = form(ShareTokenForm).from_params(params)
@form = form(ShareTokenForm).from_params(params, component:)

CreateShareToken.call(@form) do
on(:ok) do
Expand Down
2 changes: 1 addition & 1 deletion decidim-admin/app/forms/decidim/admin/share_token_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def expires_at
end

def token_for
context[:current_component]
context[:component]
end

def organization
Expand Down

0 comments on commit d3e8266

Please sign in to comment.