Class: Content::GpgKeysController

Inherits:
ApplicationController
  • Object
show all
Includes:
Foreman::Controller::AutoCompleteSearch
Defined in:
app/controllers/content/gpg_keys_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



14
15
16
17
18
19
20
21
# File 'app/controllers/content/gpg_keys_controller.rb', line 14

def create
  @gpg_key = GpgKey.new(params[:content_gpg_key])
  if @gpg_key.save
    process_success
  else
    process_error
  end
end

#destroyObject



34
35
36
37
38
39
40
# File 'app/controllers/content/gpg_keys_controller.rb', line 34

def destroy
  if @gpg_key.destroy
    process_success
  else
    process_error
  end
end

#editObject



23
24
# File 'app/controllers/content/gpg_keys_controller.rb', line 23

def edit
end

#indexObject



6
7
8
# File 'app/controllers/content/gpg_keys_controller.rb', line 6

def index
  @gpg_keys = GpgKey.search_for(params[:search], :order => params[:order]).paginate(:page => params[:page])
end

#newObject



10
11
12
# File 'app/controllers/content/gpg_keys_controller.rb', line 10

def new
  @gpg_key = GpgKey.new
end

#updateObject



26
27
28
29
30
31
32
# File 'app/controllers/content/gpg_keys_controller.rb', line 26

def update
  if @gpg_key.update_attributes(params[:content_gpg_key])
    process_success
  else
    process_error
  end
end