Class: Api::V2::RegistriesController

Inherits:
BaseController
  • Object
show all
Includes:
Foreman::Controller::Parameters::DockerRegistry
Defined in:
app/controllers/api/v2/registries_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



38
39
40
41
# File 'app/controllers/api/v2/registries_controller.rb', line 38

def create
  @registry = DockerRegistry.new(docker_registry_params)
  process_response @registry.save
end

#destroyObject



52
53
54
# File 'app/controllers/api/v2/registries_controller.rb', line 52

def destroy
  process_response @registry.destroy
end

#indexObject



26
27
28
29
# File 'app/controllers/api/v2/registries_controller.rb', line 26

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

#showObject



33
34
# File 'app/controllers/api/v2/registries_controller.rb', line 33

def show
end

#updateObject



46
47
48
# File 'app/controllers/api/v2/registries_controller.rb', line 46

def update
  process_response @registry.update_attributes(docker_registry_params)
end