A description of complete normal varieties with lower dimensional torus action has been given by Altmann, Hausen, and Suess, generalizing the theory of toric varieties. Considering the case where the acting torus T has codimension one, we describe T-invariant Weil and Cartier divisors and provide formulae for calculating global sections, intersection numbers, and Euler characteristics. As an application, we use divisors on these so-called T-varieties to define new evaluation codes called T-codes. We find estimates on their minimum distance using intersection theory. This generalizes the theory of toric codes and combines it with AG codes on curves. As the simplest application of our general techniques we look at codes on ruled surfaces coming from decomposable vector bundles. Already this construction gives codes that are better than the related product code. Further examples show that we can improve these codes by constructing more sophisticated T-varieties. These results suggest to look further for good codes on T-varieties.