Merge pull request #228 from openHPI/fix_flash_messages

Fix flash messages
This commit is contained in:
rteusner
2018-11-27 15:42:14 +01:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ class ApplicationController < ActionController::Base
end end
def render_not_authorized def render_not_authorized
redirect_to(:root, alert: t('application.not_authorized')) redirect_to(request.referrer || :root, alert: t('application.not_authorized'))
end end
private :render_not_authorized private :render_not_authorized

View File

@@ -1,4 +1,4 @@
(function() { $( document ).on('turbolinks:load', function() {
var DURATION = 10000; var DURATION = 10000;
var SEVERITIES = ['danger', 'info', 'success', 'warning']; var SEVERITIES = ['danger', 'info', 'success', 'warning'];
@@ -48,4 +48,4 @@
generateMethods(); generateMethods();
$(showFlashes); $(showFlashes);
})(); });