Class: Api::V1::CommonParametersController

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

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/common_parameters_controller.rb', line 28

def create
  @common_parameter = CommonParameter.new(params[:common_parameter])
  process_response @common_parameter.save
end

#destroyObject


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

def destroy
  process_response @common_parameter.destroy
end

#indexObject


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

def index
  @common_parameters = CommonParameter.search_for(*search_options).paginate(paginate_options)
end

#showObject


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

def show
end

#updateObject


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

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