aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorBob Remeika <bob.remeika@gmail.com>2009-09-24 21:12:11 -0700
committerStefan Penner <stefan.penner@gmail.com>2010-01-27 12:44:30 -0600
commitb225de9711e012a8ade32cc4fc947f41cbb184a1 (patch)
tree385d60087a24c2ce1b28f59872bf01ad3fedbc5f /actionpack/lib/action_view
parentafdecbc0a85fb6a61e58b8017f476fe29507e6bf (diff)
downloadrails-b225de9711e012a8ade32cc4fc947f41cbb184a1.tar.gz
rails-b225de9711e012a8ade32cc4fc947f41cbb184a1.tar.bz2
rails-b225de9711e012a8ade32cc4fc947f41cbb184a1.zip
Added assert_data_element_json test helper for data element helpers
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/ajax_helper.rb10
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 05e5fca484..18b4c4991f 100644
--- a/actionpack/lib/action_view/helpers/ajax_helper.rb
+++ b/actionpack/lib/action_view/helpers/ajax_helper.rb
@@ -94,10 +94,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]