Class: Admin::DeployKeysController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/admin/deploy_keys_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject


12
13
14
15
16
17
18
19
20
# File 'app/controllers/admin/deploy_keys_controller.rb', line 12

def create
  @deploy_key = deploy_keys.new(deploy_key_params)

  if @deploy_key.save
    redirect_to admin_deploy_keys_path
  else
    render "new"
  end
end

#destroyObject


22
23
24
25
26
27
28
29
# File 'app/controllers/admin/deploy_keys_controller.rb', line 22

def destroy
  deploy_key.destroy

  respond_to do |format|
    format.html { redirect_to admin_deploy_keys_path }
    format.json { head :ok }
  end
end

#indexObject


5
6
# File 'app/controllers/admin/deploy_keys_controller.rb', line 5

def index
end

#newObject


8
9
10
# File 'app/controllers/admin/deploy_keys_controller.rb', line 8

def new
  @deploy_key = deploy_keys.new
end