scambra/devise_invitable — comment on commit a7105842f77cfaf7a9f579a43f7d1a324ada8292
File: lib/devise_invitable/model.rb line 52
By Odaeus:

But why force the developer to use a block? It's not always practical if an object is built in a different way. Such as in my example above where the `Factory.build` call is actually in the `before` method of tests. It will mean rewriting many of my tests, which I don't mind if I've clearly done it wrong.

I'm also not sure that ignoring the "validate_on_invite" flag is reasonable as with the code change the user will still be saved in an invalid state if I call `invite!` on an instance.

If I construct the user on separate lines and call `invite!` on the instance, that will still only run validations once won't it? It won't affect the class `invite!` method?

Thanks for the quick responses!