fix 1.2.6 regression - incorrectly setup to_sql method based on Rails version
this caused double '?' bind substitution issues (reported as #322)
travis-ci test 1-2-stable branch as well