change instance variables to method calls

these instance variables are no longer available on Rails 4.  We should
use the accessor methods instead.
Merge pull request #1233 from tenderlove/methods

change instance variables to method calls