You need to use LIKE in order for wildcards to work:
LIKE
IncomingReferer.where("path LIKE '%/m/search%'")