Commit 2d5f86bf authored by Pedro Henrique's avatar Pedro Henrique
Browse files

implments good development practice


Signed-off-by: Pedro Henrique's avatarPedro Henrique! <pha14@inf.ufpr.br>
parent 32e56ed4
......@@ -114,7 +114,8 @@ class ProfessionalsController < ApplicationController
@roles.pop
if @currentProfessionalServicePlace.role == "adm_local"
@roles.pop
@current_place = @currentProfessionalServicePlace.service_place
@current_place = @currentProfessionalServicePlace.service_place.name
@current_service_place = @currentProfessionalServicePlace.service_place
end
@places = ServicePlace.active.where(:city_hall => @currentCityHall).order('name ASC')
else
......
......@@ -5,7 +5,7 @@
<h2 class="card-title"><%= t(:professional_registration) %>:</h2>
<% else %>
<% #Check if the current professional is the same city that the citizens that will be edited %>
<% if @citizen.city_id === @current_place.city_id%>
<% if @citizen.city_id === @current_service_place.city_id%>
<% same_city = false %>
<% else %>
<% same_city = true %>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment