Created
July 25, 2012 16:35
-
-
Save archiloque/3177115 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
content.save! | |
content.sources.create( | |
{ | |
# bla | |
} | |
) | |
rescue ActiveRecord::RecordNotUnique | |
next | |
rescue ActiveRecord::RecordInvalid => e | |
Base.error("Error during creation #{content.attributes} from #{meta}") | |
raise e | |
end | |
=> #<ActiveRecord::RecordNotUnique: Mysql2::Error: Duplicate entry '35291380' for key 'index_content_meta_on_content_id' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment