aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/ajax_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/helpers/ajax_helper.rb')
-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]