diff options
author | Thomas Fuchs <thomas@fesch.at> | 2007-06-03 14:27:43 +0000 |
---|---|---|
committer | Thomas Fuchs <thomas@fesch.at> | 2007-06-03 14:27:43 +0000 |
commit | 3cfb894bac2f25f2160189e4909ae7756927d8ad (patch) | |
tree | 4cd2be3584a79cf0232e8d2011d38d6e13456205 /actionpack/lib | |
parent | 13058b018861053be8bf5dbec4cafe51b89e173f (diff) | |
download | rails-3cfb894bac2f25f2160189e4909ae7756927d8ad.tar.gz rails-3cfb894bac2f25f2160189e4909ae7756927d8ad.tar.bz2 rails-3cfb894bac2f25f2160189e4909ae7756927d8ad.zip |
Allow JSON-style values for the :with option of observe_field. Closes #8557 [kommen]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6930 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
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 8c3cd907ff..33e52bfa6e 100644 --- a/actionpack/lib/action_view/helpers/prototype_helper.rb +++ b/actionpack/lib/action_view/helpers/prototype_helper.rb @@ -698,7 +698,7 @@ module ActionView end def build_observer(klass, name, options = {}) - if options[:with] && (options[:with] !~ /[=(.]/) + if options[:with] && (options[:with] !~ /[\{=(.]/) options[:with] = "'#{options[:with]}=' + value" else options[:with] ||= 'value' unless options[:function] |