class Deadwood::Katello::Changeset
Public Instance Methods
collection_path(prefix_options = {}, query_options = nil)
click to toggle source
# File lib/deadwood/model/changeset.rb, line 24 def collection_path(prefix_options = {}, query_options = nil) black_list = Array[:organization_id, :environment_id] prefix_options, query_options = split_options(prefix_options) if query_options.nil? query_options.merge!(self.attributes) org_id = self.organization_id env_id = self.environment_id # Remove the attributes that aren't allowed to be updated black_list.each {|x| attributes.delete(x)} "#{self.class.prefix(prefix_options)}organizations/#{org_id}/environments/#{env_id}/#{self.class.collection_name}#{query_string(query_options)}" end