ssh keys page: fix error with No route matches {:action=>"destroy", :controller=>"users/ssh_keys", :id=>nil} missing required keys: [:id]

This commit is contained in:
Alexander Machehin 2015-04-23 13:04:15 +05:00
parent 344e938400
commit db5b585547
1 changed files with 2 additions and 3 deletions

View File

@ -11,12 +11,11 @@ class Users::SshKeysController < Users::BaseController
if @ssh_key.save
flash[:notice] = t 'flash.ssh_keys.saved'
redirect_to ssh_keys_path
else
flash[:error] = t 'flash.ssh_keys.save_error'
# flash[:warning] = @ssh_key.errors.full_messages.join('. ') unless @ssh_key.errors.blank?
render :index
flash[:warning] = @ssh_key.errors.full_messages.join('. ') unless @ssh_key.errors.blank?
end
redirect_to ssh_keys_path
end
def destroy