I need to find in my rails app some data, first i search in rails model all data, and then via some field (which is getting from excel file) i need to find in in my array, but find as sql like %%, so not concrete, but like % % in sql. How to do this in ruby?
@suppliers = Supplier.find(:all)
supplier = @suppliers.find{|item| item['SUP_BRAND']=="*"+row[13]+"*"}
I do something like that, but that bad idea, is it any better way?