app/controllers/devise/invitations_controller.rb in devise_invitable-1.6.0 vs app/controllers/devise/invitations_controller.rb in devise_invitable-1.6.1

- old
+ new

@@ -30,11 +30,15 @@ if resource_invited if is_flashing_format? && self.resource.invitation_sent_at set_flash_message :notice, :send_instructions, :email => self.resource.email end - respond_with resource, :location => after_invite_path_for(current_inviter) + if self.method(:after_invite_path_for).arity == 1 + respond_with resource, :location => after_invite_path_for(current_inviter) + else + respond_with resource, :location => after_invite_path_for(current_inviter, resource) + end else respond_with_navigational(resource) { render :new } end end @@ -115,6 +119,5 @@ def translation_scope 'devise.invitations' end end -