Fixed Rails 4 compatibility problem.

Rails 4 was failing with this message:

"The provided regular expression is using multiline anchors (^ or $),
which may present a security risk. Did you mean to use \A and \z, or
forgot to add the :multiline => true option?