--
You received this message because you are subscribed to the Google Groups "select2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to select2+u...@googlegroups.com.
To post to this group, send email to sel...@googlegroups.com.
Visit this group at http://groups.google.com/group/select2.
For more options, visit https://groups.google.com/groups/opt_out.
The code used is here: http://www.codeproject.com/Articles/623566/Select2-The-Ultimate-jQuery-Autocomplete
q = params[:q]
table_var =TableName.arel_table
@table_instance_var = TableName.where(table_name[:attribute_name].matches("%#{q}%"))