Permalink
Browse files

Fix prototype grep depending on JSON encoding regexp as JavaScript re…

…gexp
  • Loading branch information...
1 parent 7e06494 commit fe93cd8bc58821079a9fd14b99fb78d8d517bf1b @jeremy jeremy committed Apr 28, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_view/helpers/prototype_helper.rb
View
2 actionpack/lib/action_view/helpers/prototype_helper.rb
@@ -767,7 +767,7 @@ def each_slice(variable, number, &block)
end
def grep(variable, pattern, &block)
- enumerate :grep, :variable => variable, :return => true, :method_args => [pattern], :yield_args => %w(value index), &block
+ enumerate :grep, :variable => variable, :return => true, :method_args => [::ActiveSupport::JSON::Variable.new(pattern.inspect)], :yield_args => %w(value index), &block
end
def in_groups_of(variable, number, fill_with = nil)

0 comments on commit fe93cd8

Please sign in to comment.