Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After creating casa contact redirect back to all #5169

5 changes: 2 additions & 3 deletions app/controllers/case_contacts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,9 @@ def create
@case_contact = case_contacts.first
@casa_cases = [@case_contact.casa_case]
render :new
elsif @selected_cases.count > 1
redirect_to case_contacts_path(success: true), notice: "Case contacts successfully created"
else
redirect_to casa_case_path(CaseContact.last.casa_case, success: true), notice: "Case contact successfully created"
contact_msg = @selected_cases.count > 1 ? "contants" : "contant"
redirect_to case_contacts_path(success: true), notice: "Case #{contact_msg} successfully created"
moizafzal936 marked this conversation as resolved.
Show resolved Hide resolved
end
end

Expand Down