Skip to content

Commit

Permalink
change in admin
Browse files Browse the repository at this point in the history
  • Loading branch information
andresvial committed Dec 7, 2020
1 parent 5da55d4 commit 1556cbc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/controllers/admin/prosecutors_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ def create

respond_to do |format|
if @prosecutor.save
format.html { redirect_to admin_prosecutors_path, notice: 'Fiscal ha sido creado con éxito.' }
if @prosecutor.prosecutor_on_duty == false
format.html { redirect_to admin_users_path(:attribute => 2), notice: 'Operador ha sido creado con éxito.' }
else
format.html { redirect_to admin_prosecutors_path, notice: 'Fiscal ha sido creado con éxito.' }
end
else
format.html { render :new }
end
Expand Down

0 comments on commit 1556cbc

Please sign in to comment.