mirror of
https://github.com/activerecord-hackery/ransack.git
synced 2022-11-09 13:47:45 -05:00
parent
bc686269cd
commit
71a3938a1c
1 changed files with 3 additions and 3 deletions
|
@ -21,9 +21,9 @@ module Ransack
|
|||
]
|
||||
|
||||
module_function
|
||||
# replace % _ \ to \% \_ \\
|
||||
# replace % \ to \% \\
|
||||
def escape_wildcards(unescaped)
|
||||
unescaped.gsub(/\\/){ "\\\\" }.gsub(/%/, "\\%").gsub(/_/, "\\_")
|
||||
unescaped.gsub(/\\/){ "\\\\" }.gsub(/%/, "\\%")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue