Find account name

I tried to simplify to find the root of the problem, but this doesn't work either!

APPLICATION CONTROLLER @company_id = 1;

VIEW <%= @company_id %> returns nothing

Leonel *.* wrote in post #955223:

I tried to simplify to find the root of the problem, but this doesn't work either!

APPLICATION CONTROLLER @company_id = 1;

This is a class instance variable, because self is the class itself here.

VIEW <%= @company_id %> returns nothing

This is an instance variable.

Nearly the same problem. Please read my immediate previous post. The study material I recommended in that one will solve this problem too.

You need to gain a better understanding of what belongs to the class and what belongs to the instance.

Best,

You need to gain a better understanding of what belongs to the class and what belongs to the instance.

True, will do.

Although I found a different solution.

APPLICATION HELPER def company_id     User.find_by_id(session[:user_id]).account.id   end

Leonel,

Sorry, I have been of the line for sometime. I haven’t followed this mail thread, but I had already answered your problem last Friday, so I just send it through. I hope my contribution will still be of good help.