1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Make periodically_call_remote use type="text/javascript" on script tag #2171

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2217 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2005-09-12 05:40:27 +00:00
parent a16528f715
commit de4cd789ae

View file

@ -131,7 +131,7 @@ module ActionView
def periodically_call_remote(options = {})
frequency = options[:frequency] || 10 # every ten seconds by default
code = "new PeriodicalExecuter(function() {#{remote_function(options)}}, #{frequency})"
content_tag("script", code, options[:html_options] || {})
javascript_tag(code)
end
# Returns a form tag that will submit using XMLHttpRequest in the background instead of the regular