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:
parent
344e938400
commit
db5b585547
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue