Diana is going to the county fair. It costs $8 to get in the fair and $2 per ride. Write an equation to represent the number of rides, r, that Diana went on if she had $30.