I am in dilemma here. I have structure like this:-
EmployeeB EmployeeC EmployeeD
Currently if i login with EmployeeA account, It shows me its direct
reports. Like wise if i'll login with EmployeeD then it'll show me only
EmployeeH. If i'll login with EmployeeB account then it'll only show me
But i want it like this:-
If i'll login with EmployeeA, it should show me all.
If i'll login with EmployeeB, it should show me E & F.
Currently i am trying it like this:-
direct_reports = employee.managed_employees
@all_reports += direct_reports
direct_reports.each do |report|
My logic is fine, i think but do not know where i am doing mistake ..
The error coming out is stack level too deep..
I hope you people got me right and help me for sure..