Class: Deadwood::Katello::Changeset
- Defined in:
- lib/deadwood/model/changeset.rb
Instance Method Summary collapse
Methods inherited from Base
collection_path, config, config=, element_path, get, instantiate_collection, #load_attributes_from_response, #query_string, use_oauth?
Instance Method Details
#collection_path(prefix_options = {}, query_options = nil) ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/deadwood/model/changeset.rb', line 24 def collection_path( = {}, = nil) black_list = Array[:organization_id, :environment_id] , = () if .nil? .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()}organizations/#{org_id}/environments/#{env_id}/#{self.class.collection_name}#{query_string()}" end |