Since you're checking for the existence of a returned bucket logger in the line below, you could do .find_by_name(params[:name]) here and avoid creating empty bucket loggers when they don't already exist.