aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorBob Remeika <bob.remeika@gmail.com>2009-09-23 15:06:56 -0700
committerStefan Penner <stefan.penner@gmail.com>2010-01-27 12:44:30 -0600
commitd383f057c0821faf1d1d472b471628b37cf8d67c (patch)
tree6481f562dd5d03ff52d6bec2e0695eac832a3c34 /actionpack/lib
parent25c5ddd021333f47d9728d6e2a31927d1224a869 (diff)
downloadrails-d383f057c0821faf1d1d472b471628b37cf8d67c.tar.gz
rails-d383f057c0821faf1d1d472b471628b37cf8d67c.tar.bz2
rails-d383f057c0821faf1d1d472b471628b37cf8d67c.zip
Changed the observe field node into a div with display:none
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_view/helpers/ajax_helper.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb
index 02245d9a1e..fce756869c 100644
--- a/actionpack/lib/action_view/helpers/ajax_helper.rb
+++ b/actionpack/lib/action_view/helpers/ajax_helper.rb
@@ -84,12 +84,17 @@ module ActionView
url = options.delete(:url)
url = url_for(url) if url.is_a?(Hash)
- if frequency = options.delete(:frequency)
+ frequency = options.delete(:frequency)
+ if frequency && frequency > 0
html_options[:"data-frequency"] = frequency
end
- html_options.merge!(:"data-observe" => true, :"data-url" => url)
- tag(:input, html_options)
+ html_options.merge!(:style => "display:none",
+ :"data-observe-field" => name,
+ :"data-observe" => true,
+ :"data-url" => url)
+
+ tag(:div, html_options)
end
module Rails2Compatibility