From fe93cd8bc58821079a9fd14b99fb78d8d517bf1b Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 27 Apr 2010 22:52:37 -0700 Subject: Fix prototype grep depending on JSON encoding regexp as JavaScript regexp --- actionpack/lib/action_view/helpers/prototype_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/helpers') diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb index ebe0b4e876..a798c3eaef 100644 --- a/actionpack/lib/action_view/helpers/prototype_helper.rb +++ b/actionpack/lib/action_view/helpers/prototype_helper.rb @@ -767,7 +767,7 @@ module ActionView 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) -- cgit v1.2.3