diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb index 2a9c7a79..134262d7 100644 --- a/app/controllers/events_controller.rb +++ b/app/controllers/events_controller.rb @@ -60,7 +60,7 @@ class EventsController < ApplicationController def update respond_to do |format| if @event.update event_params - format.html { redirect_to :root, notice: t('.ok') } + format.html { redirect_to @event, notice: t('.ok') } format.json { head :no_content } else format.html { render action: 'edit' } diff --git a/test/controllers/events_controller_test.rb b/test/controllers/events_controller_test.rb index caf1a5d7..eaf6faf6 100644 --- a/test/controllers/events_controller_test.rb +++ b/test/controllers/events_controller_test.rb @@ -92,7 +92,7 @@ class EventsControllerTest < ActionDispatch::IntegrationTest } assert_empty assigns(:event).errors.messages - assert_redirected_to :root + assert_redirected_to event_url(@event) end test 'should not update event' do