Class: RegistriesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- RegistriesController
- Includes:
- Foreman::Controller::AutoCompleteSearch
- Defined in:
- app/controllers/registries_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #find_registry ⇒ Object
- #index ⇒ Object
- #new ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'app/controllers/registries_controller.rb', line 14 def create @registry = DockerRegistry.new(params[:docker_registry]) if @registry.save process_success else process_error end end |
#destroy ⇒ Object
34 35 36 37 38 39 40 |
# File 'app/controllers/registries_controller.rb', line 34 def destroy if @registry.destroy process_success else process_error end end |
#edit ⇒ Object
23 24 |
# File 'app/controllers/registries_controller.rb', line 23 def edit end |
#find_registry ⇒ Object
42 43 44 45 46 |
# File 'app/controllers/registries_controller.rb', line 42 def find_registry @registry = DockerRegistry.find(params[:id]) rescue ActiveRecord::RecordNotFound not_found end |
#index ⇒ Object
5 6 7 8 |
# File 'app/controllers/registries_controller.rb', line 5 def index @registries = DockerRegistry.search_for(params[:search], :order => params[:order]) .paginate :page => params[:page] end |
#new ⇒ Object
10 11 12 |
# File 'app/controllers/registries_controller.rb', line 10 def new @registry = DockerRegistry.new end |
#update ⇒ Object
26 27 28 29 30 31 32 |
# File 'app/controllers/registries_controller.rb', line 26 def update if @registry.update_attributes(params[:docker_registry]) process_success else process_error end end |