I have this string: 'industry.in'
and I want to convert it to :industry.in
. When I do 'industry.in'.to_sym
, the result is: :"industry.in"
.
Anyone know how to make it into: :industry.in
instead?
I'm doing this so I could make a criteria query in Mongoid for an array field:
criteria = 'industry.in'.to_sym
Company.where(criteria => ['Information Technology'])