diff options
author | Bob Remeika <bob.remeika@gmail.com> | 2009-09-24 21:12:11 -0700 |
---|---|---|
committer | Stefan Penner <stefan.penner@gmail.com> | 2010-01-27 12:44:28 -0600 |
commit | 0955f5791555127d2ea3ab1c8a2450bca5a4236a (patch) | |
tree | 91a4add07859f0498802a69546c99965aed26d56 /actionpack/lib | |
parent | 6fa8f81d7d730527f92d8e373dfc32199799681b (diff) | |
download | rails-0955f5791555127d2ea3ab1c8a2450bca5a4236a.tar.gz rails-0955f5791555127d2ea3ab1c8a2450bca5a4236a.tar.bz2 rails-0955f5791555127d2ea3ab1c8a2450bca5a4236a.zip |
Added assert_data_element_json test helper for data element helpers
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/ajax_helper.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 43856acbc8..688a5262c7 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -48,10 +48,12 @@ module ActionView end end - if options[:with] && (options[:with] !~ /[\{=(.]/) - options[:with] = "'#{options[:with]}=' + encodeURIComponent(value)" - else - options[:with] ||= 'value' unless options[:function] + if options[:with] + if options[:with] !~ /[\{=(.]/ + options[:with] = "'#{options[:with]}=' + encodeURIComponent(value)" + else + options[:with] ||= 'value' unless options[:function] + end end if options[:function] |