Community Page
- paulmwatson.com/journal Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- Make songbird look like spotify: http://addons.songbirdnest.com/addon/1440
- Got it, thanks Paul!
- Email me your email address so I can invite you Mike (paul@paulmwatson.com)
- Happy New Year to you, as well! I was stopping by to see if you would be willing to lend a reader a Spotify invitation. I am desperately hoping to be able try out the service. Thanks! Mike
- Nice one Jamie. Even more ironic is that that "mass production" is probably still underpaid, underage workers in some 3rd world country sweat-shop.
Jump to original thread »
if soapResponse.getNewTagsSinceResult.respond_to? "tag"
if soapResponse.getNewTagsSinceResult.tag.is_a? Array
for tag in soapResponse.getNewTagsSinceResult.tag
@tag = Tag.find_by_sync_id(tag.id)
% ... Continue reading »
if soapResponse.getNewTagsSinceResult.tag.is_a? Array
for tag in soapResponse.getNewTagsSinceResult.tag
@tag = Tag.find_by_sync_id(tag.id)
% ... Continue reading »
3 years ago
if soapResponse.getNewTagsSinceResult.respond_to? "tag"
for tag in soapResponse.getNewTagsSinceResult.tag.to_a
@tag = Tag.find_by_sync_id(tag.id)
if (@tag)
@tag.name = tag.name
@tag.save
else
@tag = Tag.new
@tag.name = tag.name
@tag.sync_id = tag.id
@tag.save
end
end
end
Just a quick warning that currently all objects respond to to_a but this will soon be deprecated so for future versions it's better to check that the tag object class explicity implements to_a.
3 years ago
@tag = Tag.find_by_syn_id(tag.id) || Tag.new
@tag.name = tag.name
@tag.sync_id ||= tag.id
@tag.save
3 years ago
3 years ago
3 years ago
if soapResponse.getNewTagsSinceResult.respond_to? "tag" for tag_current in Array(soapResponse.getNewTagsSinceResult.tag)
tag = Tag.find_by_sync_id(tag_current.id) || Tag.new
tag.name = tag_current.name
tag.sync_id = tag_current.id
tag.save
end
end
Thanks Farrel.