> [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
Colin
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment