Re: model issues with ruby on rails 3

Colin Law
2012-04-13T08:05:28Z

On 13 April 2012 06:50, amvis
<vgrkrishnan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
> [snip]
> when i check like this i got the solution
>
>   if !@user.business_admins[0].nil?

if !@user.business_admins.empty?
might be a bit cleaner and easier to understand, or
if @user.business_admins.count == 0