Skip to content

Instantly share code, notes, and snippets.

@alexhanh
Created December 18, 2011 13:57
Show Gist options
  • Select an option

  • Save alexhanh/1493492 to your computer and use it in GitHub Desktop.

Select an option

Save alexhanh/1493492 to your computer and use it in GitHub Desktop.
class Base < ActiveRecord::Base
def self.select_all(array)
sql = self.send(:sanitize_sql_array, array)
connection.select_all(sql)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment