app/controllers/concerns/account/memberships/controller_base.rb in bullet_train-1.1.5 vs app/controllers/concerns/account/memberships/controller_base.rb in bullet_train-1.1.6
- old
+ new
@@ -82,19 +82,14 @@
rescue RemovingLastTeamAdminException
redirect_to account_team_memberships_path(@team), alert: I18n.t("memberships.notifications.cant_remove")
end
def reinvite
- if helpers.current_limits.can?(:create, Membership)
- @invitation = Invitation.new(membership: @membership, team: @team, email: @membership.user_email, from_membership: current_membership)
- if @invitation.save
- redirect_to [:account, @team, :memberships], notice: I18n.t("account.memberships.notifications.reinvited")
- else
- redirect_to [:account, @team, :memberships], notice: "There was an error creating the invitation (#{@invitation.errors.full_messages.to_sentence})"
- end
+ @invitation = Invitation.new(membership: @membership, team: @team, email: @membership.user_email, from_membership: current_membership)
+ if @invitation.save
+ redirect_to [:account, @team, :memberships], notice: I18n.t("account.memberships.notifications.reinvited")
else
- flash[:error] = :create_limit
- redirect_to [:account, @team, :memberships]
+ redirect_to [:account, @team, :memberships], notice: "There was an error creating the invitation (#{@invitation.errors.full_messages.to_sentence})"
end
end
private