Moves yield around resource before checking if the invitation was successfully sent

The previous behavior only let to add behavior if the invitation was successfully sent.

```ruby
def create
  super do |resource|
    excecute_success_behavior
  end
end
```

With this fix, we can add a behavior when the invitation creation success or fails.

```ruby
def create
  super do |resource|
    if resource.errors.empty?
      excecute_success_behavior
    else
      excecute_failure_behavior
    end
  end
end
```

Same goes when accepting the invitation.