Fix announcement redirect

pull/4577/head
Oliver Günther 8 years ago
parent fa6cddfe39
commit 09f4034067
  1. 2
      app/controllers/announcements_controller.rb
  2. 2
      spec/controllers/announcements_controller_spec.rb

@ -15,7 +15,7 @@ class AnnouncementsController < ApplicationController
flash[:success] = t(:notice_successful_update)
end
render action: 'edit'
redirect_to action: 'edit'
end
private

@ -30,7 +30,7 @@ describe AnnouncementsController, type: :controller do
end
it 'edits the announcement' do
expect(response).to render_template 'edit'
expect(response).to redirect_to action: :edit
expect(controller).to set_flash[:success].to I18n.t(:notice_successful_update)
end
end

Loading…
Cancel
Save