Skip to content

Instantly share code, notes, and snippets.

@lbergen
Created May 23, 2012 19:19
Show Gist options
  • Save lbergen/2777201 to your computer and use it in GitHub Desktop.
Save lbergen/2777201 to your computer and use it in GitHub Desktop.
bright_cove_content_parts = ContentPart.find(:all, :conditions=>["content like '%%c.brightcove.com%%'"])
def parse_it(x)
x
end
map = {}
bright_cove_content_parts.each do |bc_cp|
map[bc_cp.version.content_id] ||= {}
map[bc_cp.version.content_id][bc_cp.template_part_id] = parse_it(bc_cp.content)
end
map
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment