Commit 1b10724e authored by Robert Speicher's avatar Robert Speicher

Don't abuse the flash store for displaying SSH Key form errors

parent 01b89ee8
...@@ -3,7 +3,7 @@ class Profiles::KeysController < Profiles::ApplicationController ...@@ -3,7 +3,7 @@ class Profiles::KeysController < Profiles::ApplicationController
def index def index
@keys = current_user.keys @keys = current_user.keys
@key = flash[:key] || Key.new @key = Key.new
end end
def show def show
...@@ -16,7 +16,8 @@ class Profiles::KeysController < Profiles::ApplicationController ...@@ -16,7 +16,8 @@ class Profiles::KeysController < Profiles::ApplicationController
if @key.save if @key.save
redirect_to profile_key_path(@key) redirect_to profile_key_path(@key)
else else
redirect_to profile_keys_path, flash: { key: @key } @keys = current_user.keys.select(&:persisted?)
render :index
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment