lib/sorenson/services/group.rb in 360_services-1.0.4 vs lib/sorenson/services/group.rb in 360_services-1.0.5
- old
+ new
@@ -11,11 +11,10 @@
data = post_to("/groups", :group => attributes.merge(:name => name))
new(data['group'])
end
def self.update(name, attributes={})
- return nil if attributes[:preset_ids].nil?
- attributes[:preset_ids] = attributes[:preset_ids].join(",")
+ attributes[:preset_ids] = (attributes[:preset_ids] || []).join(",")
guid = attributes.delete(:group_id)
data = put_to("/groups/#{guid}", :group => attributes.merge({:name => name, :id => guid}))
new(data['group'])
end
\ No newline at end of file