From f115fb011169cadfd1977c7e6d6ddef2eecc96de Mon Sep 17 00:00:00 2001 From: "Stephen St. Martin" Date: Sat, 23 Jan 2010 13:06:24 -0500 Subject: make observers a little more dry --- actionpack/lib/action_view/helpers/ajax_helper.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index f2ff424576..4081117ad1 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -60,7 +60,6 @@ module ActionView def observe_field(name, options = {}) options[:observed] = name attributes = extract_observer_attributes!(options) - attributes["data-observe"] = true script_decorator(attributes) end @@ -68,7 +67,6 @@ module ActionView def observe_form(name, options = {}) options[:observed] = name attributes = extract_observer_attributes!(options) - attributes["data-js-type"] = "form_observer" script_decorator(attributes) end @@ -130,6 +128,7 @@ module ActionView def extract_observer_attributes!(options) attributes = extract_remote_attributes!(options) + attributes["data-observe"] = true attributes["data-observed"] = options.delete(:observed) callback = options.delete(:function) -- cgit v1.2.3