Bettas should not be kept in anything less than 5 gallons because it can't be heated, and they need temps at least 78*F. Check out the site
www.bettatalk.com for info on keeping bettas. Any other kinds of fish need at least 10 gallon tanks, because it is very hard to maintain good water conditions in anything smaller--5 gallons are OK for bettas because there is only one fish.
I also do not recommend undergravel filters, because they are almost impossible to clean and provide only biological filtration. You also can't grow live plants with a ug filter.