diff options
Diffstat (limited to 'app/controllers/profiles/keys_controller.rb')
-rw-r--r-- | app/controllers/profiles/keys_controller.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/controllers/profiles/keys_controller.rb b/app/controllers/profiles/keys_controller.rb index f3224148fda..b88c080352b 100644 --- a/app/controllers/profiles/keys_controller.rb +++ b/app/controllers/profiles/keys_controller.rb @@ -3,23 +3,21 @@ class Profiles::KeysController < Profiles::ApplicationController def index @keys = current_user.keys + @key = Key.new end def show @key = current_user.keys.find(params[:id]) end - def new - @key = current_user.keys.new - end - def create @key = current_user.keys.new(key_params) if @key.save redirect_to profile_key_path(@key) else - render 'new' + @keys = current_user.keys.select(&:persisted?) + render :index end end |