diff options
Diffstat (limited to 'actionpack/lib/action_view/helpers/javascript_helper.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/javascript_helper.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb index 513074cddd..1d70073069 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionpack/lib/action_view/helpers/javascript_helper.rb @@ -158,8 +158,9 @@ module ActionView js_options = build_callbacks(options) js_options['asynchronous'] = options[:type] != :synchronous - js_options['method'] = options[:method] if options[:method] - js_options['effect'] = ("\'"+options[:effect].to_s+"\'") if options[:effect] + js_options['method'] = options[:method] if options[:method] + js_options['position'] = options[:position] ? "'#{options[:position].to_s}'" : "'replace'" + js_options['effect'] = ("\'"+options[:effect].to_s+"\'") if options[:effect] if options[:form] js_options['parameters'] = 'Form.serialize(this)' |