diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb
index b570eb44a7..8d09ca1187 100644
--- a/actionpack/lib/action_view/helpers/ajax_helper.rb
+++ b/actionpack/lib/action_view/helpers/ajax_helper.rb
@@ -402,6 +402,9 @@ module ActionView
attributes = extract_observer_attributes!(options)
attributes["data-periodical"] = true
+ # periodically_call_remote does not need data-observe=true
+ attributes.delete('data-observe')
+
script_decorator(attributes)
end
diff --git a/actionpack/test/template/ajax_helper_test.rb b/actionpack/test/template/ajax_helper_test.rb
index d31e4daf08..47d458e4ef 100644
--- a/actionpack/test/template/ajax_helper_test.rb
+++ b/actionpack/test/template/ajax_helper_test.rb
@@ -160,13 +160,13 @@ class AjaxHelperTest < AjaxHelperBaseTest
end
test "periodically_call_remote" do
- assert_dom_equal %(),
+ assert_dom_equal %(),
periodically_call_remote(:update => "schremser_bier", :url => { :action => "mehr_bier" })
end
test "periodically_call_remote_with_frequency" do
assert_dom_equal(
- "",
+ "",
periodically_call_remote(:frequency => 2)
)
end