modify gem to work with rails 3