diff options
author | Phil Hughes <me@iamphill.com> | 2016-02-29 20:19:00 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-03-04 00:13:55 +0300 |
commit | 1efe1054150177ac5eb31ff85e2c18c5856d480a (patch) | |
tree | 4e6b0caf98a6fc28853d5da3ce9a0fe877ca25cf /app/controllers/profiles | |
parent | ba869ae50d0c43867f7d34a4f7e08520c1e4c7f1 (diff) |
SSH keys settings
Closes #13860
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 f3224148fda..6815cb69b68 100644 --- a/app/controllers/profiles/keys_controller.rb +++ b/app/controllers/profiles/keys_controller.rb @@ -3,6 +3,7 @@ class Profiles::KeysController < Profiles::ApplicationController def index @keys = current_user.keys + @key = flash[:key] || Key.new end def show @@ -10,7 +11,7 @@ class Profiles::KeysController < Profiles::ApplicationController end def new - @key = current_user.keys.new + redirect_to profile_keys_path end def create @@ -19,7 +20,7 @@ class Profiles::KeysController < Profiles::ApplicationController if @key.save redirect_to profile_key_path(@key) else - render 'new' + redirect_to profile_keys_path, flash: {key: @key} end end |