Oscar

Results 8 comments of Oscar

I see the email validation was updated sometime after this thread. Was there a standard settled for? Currently, it marks entries such as `"]"@bar.com`,`")"@bar.com`, `&@bar.com`, `"@bar.com`, `'@bar.com.`

I'll like to try my hands on this. @Ic3fr0g could you clarify how you obtain the annotations? Going through your script looks like its only the tag title it uses.

Hello @binups could you explain some more? Like, what's your current setup like? what have you tried and the challenge

Hi @proton, I'm looking to take this on. What do you think of changing https://github.com/proton/mongoid_auto_increment/blob/master/lib/mongoid_auto_increment.rb#L17 to `after_create` instead? That way the sequence is only generated when the DB persistence is...

@proton my understanding is that if create fails the `@@incrementor.inc(seq_name, options))` logic never executes and `@@incrementor` will remain in the state it was in before the creation was attempted. That...

As per this issue, I suggest using `after_create` instead so that sequences are only assigned to records that will successfully be persisted.

I'm not sure I understand what you mean. Activerecord callbacks are executed within a single database transaction (See the transaction section [here](https://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html)). Maybe I'm missing something but switching from `before_create`...

Ahh, my bad I was looking at the wrong docs. But why will switching from `before_create` to `after_create` introduce another transaction in mongoid?