Skip to content

Commit

Permalink
Group.find returns a group with group_id without the domain. #27
Browse files Browse the repository at this point in the history
  • Loading branch information
dbraga committed Oct 6, 2012
1 parent ec79f89 commit 148c8eb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/ruby_provisioning_api/group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@ def self.find(group_id)
xml = Nokogiri::XML(response.body)
group = Group.new
GROUP_ATTRIBUTES.each do |attribute_name|
group.send("#{attribute_name.underscore}=",xml.children.css("entry apps|property[name='#{attribute_name}']").attribute("value").value)
name = "#{attribute_name.underscore}="
value = xml.children.css("entry apps|property[name='#{attribute_name}']").attribute("value").value
if name.eql?("group_id=")
value = value.split("@").first
end
group.send(name, value)
end
group
end
Expand Down

0 comments on commit 148c8eb

Please sign in to comment.