Skip to content

Instantly share code, notes, and snippets.

@mulder
Created November 25, 2009 18:11
Show Gist options
  • Save mulder/242913 to your computer and use it in GitHub Desktop.
Save mulder/242913 to your computer and use it in GitHub Desktop.
Relation.find_all_by_to_type('Content::Article').each {|r| r.from_type,r.from_id,r.to_type,r.to_id = r.to_type,r.to_id,r.from_type,r.from_id; r.save}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment