diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-04-27 22:52:37 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-04-27 22:52:37 -0700 |
commit | fe93cd8bc58821079a9fd14b99fb78d8d517bf1b (patch) | |
tree | 4b98b51d198273799547d29fecf091519138b8dc /actionpack/lib | |
parent | 7e06494e32f944f8c99d7d21e17224509332ee6b (diff) | |
download | rails-fe93cd8bc58821079a9fd14b99fb78d8d517bf1b.tar.gz rails-fe93cd8bc58821079a9fd14b99fb78d8d517bf1b.tar.bz2 rails-fe93cd8bc58821079a9fd14b99fb78d8d517bf1b.zip |
Fix prototype grep depending on JSON encoding regexp as JavaScript regexp
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/prototype_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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) |