Use start and end of string rather than line matching in regexes.

This commit is contained in:
Dylan Thacker-Smith
2014-03-13 17:56:42 -04:00
parent 3efa8e8762
commit 503d924274
10 changed files with 21 additions and 21 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ module ShopFilter
def product_img_url(url, style = 'small')
unless url =~ /^products\/([\w\-\_]+)\.(\w{2,4})/
unless url =~ /\Aproducts\/([\w\-\_]+)\.(\w{2,4})/
raise ArgumentError, 'filter "size" can only be called on product images'
end