hullo. it seem the ruby syntax parser has issues with the legal
"#{("and" + " like '%#{@mimetype}%'") unless @mimetype.nil?}"
I've used "#{("and" + " like '%" + @mimetype +"%'") unless @mimetype.nil?}" instead. but thought i would pass along this bit.
-- this morning i breathed down a hill, last night i breathed into the sound of warm blankets today i tango to El Cholulo