diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-03-03 15:40:00 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-03-03 16:13:59 -0500 |
commit | 1b10724e08ebce422366745013fb785fc993f1c7 (patch) | |
tree | 78aa0f8b5e63ed4791136208e9f2c174524fff9d /app/controllers/profiles | |
parent | 01b89ee8f17f837544d744c021b92950426a60d8 (diff) | |
download | gitlab-ce-1b10724e08ebce422366745013fb785fc993f1c7.tar.gz |
Don't abuse the flash store for displaying SSH Key form errors
Diffstat (limited to 'app/controllers/profiles')
-rw-r--r-- | app/controllers/profiles/keys_controller.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/profiles/keys_controller.rb b/app/controllers/profiles/keys_controller.rb index 4dadd076728..b88c080352b 100644 --- a/app/controllers/profiles/keys_controller.rb +++ b/app/controllers/profiles/keys_controller.rb @@ -3,7 +3,7 @@ class Profiles::KeysController < Profiles::ApplicationController def index @keys = current_user.keys - @key = flash[:key] || Key.new + @key = Key.new end def show @@ -16,7 +16,8 @@ class Profiles::KeysController < Profiles::ApplicationController if @key.save redirect_to profile_key_path(@key) else - redirect_to profile_keys_path, flash: { key: @key } + @keys = current_user.keys.select(&:persisted?) + render :index end end |