add rails codes query_by_attr.rb