Skip to content

Instantly share code, notes, and snippets.

@xn
Created April 27, 2011 04:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xn/943721 to your computer and use it in GitHub Desktop.
Save xn/943721 to your computer and use it in GitHub Desktop.
try this
def create_tracked_project(*xpids)
(xpids.flatten.each(&:strip!)).collect do |xpid|
begin
xproject = authorization.ticketmaster.projects.detect {|xp| xp.name == xpid}
new_tracked_project = TrackedProject.create_from(xproject)
tracked_projects << new_tracked_project
rescue => exc
warn exc
raise exc
end
new_tracked_project
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment