I want to be able to do Artist.case_insensitive_find_or_create_by_name(artist_name)[1] (and have it work on both sqlite and postgreSQL)
Artist.case_insensitive_find_or_create_by_name(artist_name)
What\'s the best
Rails 4 gives you a way to accomplish the same thing:
Artist.where('lower(name) = ?', name.downcase).first_or_create(:name=>name)