This is a long method. Possibly worthy of being a class itself. Check out Ruby Science, Joe just wrote a chapter on `Extract Class` that has an invitations controller very similar to this one. You can checkout the chapter on `Introduce Form Object` and `Extract Validator` too.