Class: Api::V1::SmartProxiesController

Inherits:
BaseController show all
Defined in:
app/controllers/api/v1/smart_proxies_controller.rb

Direct Known Subclasses

Api::V2::SmartProxiesController

Instance Method Summary collapse

Methods included from Api::Version1

#api_version

Methods inherited from BaseController

#get_resource, #resource_class, #resource_name, #resource_scope

Methods included from Foreman::ThreadSession::Cleaner

#clear_thread, included

Instance Method Details

#createObject


28
29
30
31
# File 'app/controllers/api/v1/smart_proxies_controller.rb', line 28

def create
  @smart_proxy = SmartProxy.new(params[:smart_proxy])
  process_response @smart_proxy.save
end

#destroyObject


47
48
49
# File 'app/controllers/api/v1/smart_proxies_controller.rb', line 47

def destroy
  process_response @smart_proxy.destroy
end

#indexObject


12
13
14
# File 'app/controllers/api/v1/smart_proxies_controller.rb', line 12

def index
  @smart_proxies = proxies_by_type(params[:type]).paginate(paginate_options)
end

#showObject


19
20
# File 'app/controllers/api/v1/smart_proxies_controller.rb', line 19

def show
end

#updateObject


40
41
42
# File 'app/controllers/api/v1/smart_proxies_controller.rb', line 40

def update
  process_response @smart_proxy.update_attributes(params[:smart_proxy])
end