Last active
December 17, 2018 12:59
-
-
Save frcake/365e83ca843e905a9f5cbec1fceed42f 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
def persist | |
ActiveRecord::Base.transaction do | |
entity_collection.each(&:save!) | |
end | |
end |
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
def persist | |
RawUserDatum.transaction do | |
entity_collection.each(&:save!) | |
end | |
rescue ActiveRecord::RecordInvalid => invalid_record | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment