disable admin bar

I'm trying to disable the admin bar for all users except admin
I placed the following code in the function.php of the file
/* Disable WordPress Admin Bar for all users but admins. */
if (!current_user_can('administrator')):
show_admin_bar(false);
endif;

and that did not work I tried
/* Disable WordPress Admin Bar for all users but admins. */
show_admin_bar(false);

and that dis not work ... how can I accomplish this ?