Methods
Class Public methods
create_or_find_by(attributes, &block) Link
Source: show
# File app/models/db/daily_notification_run.rb, line 14 def create_or_find_by(attributes, &block) record = new(attributes, &block) transaction(requires_new: true) do record.save(validate: false) record end rescue ActiveRecord::RecordNotUnique find_with = attributes.merge(record.attributes.slice("run_time_epoch")) find_by!(find_with) end