Skip to content
New issue

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

Task/fix grant redirect on slug change #1056

Merged
merged 5 commits into from
Jun 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Reload grant on edit to get current friendly url
jseraf committed Jun 11, 2024
commit 277fbd7b1f923113b981161c7be7bf539b10d235
3 changes: 2 additions & 1 deletion app/controllers/grants_controller.rb
Original file line number Diff line number Diff line change
@@ -62,7 +62,8 @@ def update
authorize @grant
if @grant.update(grant_params)
flash[:notice] = 'Grant was successfully updated.'
redirect_back(fallback_location: grant_path(@grant))

redirect_to edit_grant_path(@grant.reload)
else
flash.now[:alert] = @grant.errors.full_messages
render :edit