Project

General

Profile

« Previous | Next » 

Revision e1a1fa81

Added by Joseph Magen over 11 years ago

  • ID e1a1fa814a7ad0ecb390ccb1ca59e4df5d505f1e

fixes #2239 API v2 CRUD for locations and organizations and added nested loc/org

View differences:

app/controllers/api/v2/config_templates_controller.rb
module V2
class ConfigTemplatesController < V1::ConfigTemplatesController
include Api::Version2
include Api::TaxonomyScope
before_filter :process_operatingsystems, :only => [:create, :update]
def index
super
render :template => "api/v1/config_templates/index"
end
def show
super
render :template => "api/v1/config_templates/show"
end
def process_operatingsystems
return unless (ct = params[:config_template]) and (operatingsystems = ct.delete(:operatingsystems))
ct[:operatingsystem_ids] = operatingsystems.collect {|os| os[:id]}
end
end
end
end

Also available in: Unified diff