diff options
author | Stephen St. Martin <kuprishuz@gmail.com> | 2010-01-23 13:06:24 -0500 |
---|---|---|
committer | Stefan Penner <stefan.penner@gmail.com> | 2010-01-27 12:44:32 -0600 |
commit | f115fb011169cadfd1977c7e6d6ddef2eecc96de (patch) | |
tree | 8a2472509da0754240c8c9e2507f58a351b85634 /actionpack/lib/action_view/helpers/ajax_helper.rb | |
parent | 49e84a59439074fb7742b662db21e9638d41cfd0 (diff) | |
download | rails-f115fb011169cadfd1977c7e6d6ddef2eecc96de.tar.gz rails-f115fb011169cadfd1977c7e6d6ddef2eecc96de.tar.bz2 rails-f115fb011169cadfd1977c7e6d6ddef2eecc96de.zip |
make observers a little more dry
Diffstat (limited to 'actionpack/lib/action_view/helpers/ajax_helper.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/ajax_helper.rb | 3 |
1 files changed, 1 insertions, 2 deletions
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) |