Skip to content

Commit

Permalink
Use full i18n keys due to flash weirdness
Browse files Browse the repository at this point in the history
  • Loading branch information
brianjaustin committed Apr 9, 2024
1 parent f644b29 commit 43313b1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/challenge_assignments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def load_assignment_from_id
def owner_only
return if current_user == @challenge_assignment.offering_pseud.user

flash[:error] = t(".validations.not_owner")
flash[:error] = t("challenge_assignments.validation.not_owner")
redirect_to root_path
end

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/collection_participants_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class CollectionParticipantsController < ApplicationController
cache_sweeper :collection_sweeper

def owners_required
flash[:error] = t(".validation.owners_required")
flash[:error] = t("collection_participants.validation.owners_required")
redirect_to collection_participants_path(@collection)
false
end
Expand Down
2 changes: 1 addition & 1 deletion config/locales/controllers/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ en:
destroy:
unblocked: You have unblocked the user %{name}.
challenge_assignments:
validations:
validation:
not_owner: You aren't the owner of that assignment.
chapters:
destroy:
Expand Down

0 comments on commit 43313b1

Please sign in to comment.