Fix the class for ActiveRecord Named Scope in rails 3.2.18