Project

General

Profile

Download (784 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_for(params[:search], :order => params[:order]).paginate(:page => params[: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_attributes(domain_params)
process_success
else
process_error
end
end

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