Project

General

Profile

Download (702 Bytes) Statistics
| Branch: | Tag: | Revision:
class DomainsController < ApplicationController
include Foreman::Controller::AutoCompleteSearch
include Foreman::Controller::Parameters::Domain
before_action :find_resource, :only => [:edit, :update, :destroy]

def index
@domains = resource_base_search_and_page
end

def new
@domain = Domain.new
end

def create
@domain = Domain.new(domain_params)
if @domain.save
process_success
else
process_error
end
end

def edit
end

def update
if @domain.update(domain_params)
process_success
else
process_error
end
end

def destroy
if @domain.destroy
process_success
else
process_error
end
end
end
(16-16/58)