On 18 October 2010 17:24, Leonel *.* wrote:
> Currently, I have this on the application controller...
> def company_name
> User.find_by_id(session[:user_id]).account.name
> end
>
> So then in each controller I have to add this, which is not very DRY.
> The @company_id needs to be used in almo
Currently, I have this on the application controller...
def company_name
User.find_by_id(session[:user_id]).account.name
end
So then in each controller I have to add this, which is not very DRY.
The @company_id needs to be used in almost every page and it's accessed
on the application.html
2 matches
Mail list logo