fix old ActiveRecord query grammar
fix the forgotten .rb suffix and replace the tab with space