app/controllers/devise/invitations_controller.rb in devise_invitable-1.3.3 vs app/controllers/devise/invitations_controller.rb in devise_invitable-1.3.4

- old
+ new

@@ -15,10 +15,11 @@ # POST /resource/invitation def create self.resource = invite_resource if resource.errors.empty? + yield resource if block_given? set_flash_message :notice, :send_instructions, :email => self.resource.email if self.resource.invitation_sent_at respond_with resource, :location => after_invite_path_for(resource) else respond_with_navigational(resource) { render :new } end @@ -33,9 +34,10 @@ # PUT /resource/invitation def update self.resource = accept_resource if resource.errors.empty? + yield resource if block_given? flash_message = resource.active_for_authentication? ? :updated : :updated_not_active set_flash_message :notice, flash_message sign_in(resource_name, resource) respond_with resource, :location => after_accept_path_for(resource) else