Skip to content

Instantly share code, notes, and snippets.

@reinh
Forked from sandro/idiomatic_throw_catch?.rb
Created July 18, 2011 22:13
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 reinh/1090821 to your computer and use it in GitHub Desktop.
Save reinh/1090821 to your computer and use it in GitHub Desktop.
def update_main_artist
artist = rovi_artist ? Artist.find_or_create_by_name rovi_artist.name : artists.first
update_attribute :main_artist_id, artist.id
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment