Skip to content

Commit 68c5f4b

Browse files
committed
Fix navigation to updated page after create and update actions
1 parent 8e37084 commit 68c5f4b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/controllers/better_together/pages_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def create
3030
authorize @page
3131

3232
if @page.save
33-
redirect_to @page.url, notice: 'Page was successfully created.'
33+
redirect_to @page, notice: 'Page was successfully created.'
3434
else
3535
render :new
3636
end
@@ -44,7 +44,7 @@ def update
4444
authorize @page
4545

4646
if @page.update(page_params)
47-
redirect_to @page.url, notice: 'Page was successfully updated.'
47+
redirect_to @page, notice: 'Page was successfully updated.'
4848
else
4949
render :edit
5050
end

0 commit comments

Comments
 (0)