aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/prototype_helper.rb
diff options
context:
space:
mode:
authorJosh Kalderimis <josh.kalderimis@gmail.com>2010-06-21 22:11:12 +0200
committerJosé Valim <jose.valim@gmail.com>2010-06-21 23:34:45 +0200
commitdad71c6099e0e5cfb50f574853255e1abc255c34 (patch)
tree6f8305feda08c5f617554d2c5b0037c702cb6829 /actionpack/lib/action_view/helpers/prototype_helper.rb
parent0421fb7a913c1c8a7e07a395106bbc65e75e9d45 (diff)
downloadrails-dad71c6099e0e5cfb50f574853255e1abc255c34.tar.gz
rails-dad71c6099e0e5cfb50f574853255e1abc255c34.tar.bz2
rails-dad71c6099e0e5cfb50f574853255e1abc255c34.zip
removed 'unless const_defined?' code smell
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/lib/action_view/helpers/prototype_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/prototype_helper.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb
index 3038b07143..bfb8f74a00 100644
--- a/actionpack/lib/action_view/helpers/prototype_helper.rb
+++ b/actionpack/lib/action_view/helpers/prototype_helper.rb
@@ -95,14 +95,12 @@ module ActionView
# See JavaScriptGenerator for information on updating multiple elements
# on the page in an Ajax response.
module PrototypeHelper
- unless const_defined? :CALLBACKS
- CALLBACKS = Set.new([ :create, :uninitialized, :loading, :loaded,
- :interactive, :complete, :failure, :success ] +
- (100..599).to_a)
- AJAX_OPTIONS = Set.new([ :before, :after, :condition, :url,
- :asynchronous, :method, :insertion, :position,
- :form, :with, :update, :script, :type ]).merge(CALLBACKS)
- end
+ CALLBACKS = Set.new([ :create, :uninitialized, :loading, :loaded,
+ :interactive, :complete, :failure, :success ] +
+ (100..599).to_a)
+ AJAX_OPTIONS = Set.new([ :before, :after, :condition, :url,
+ :asynchronous, :method, :insertion, :position,
+ :form, :with, :update, :script, :type ]).merge(CALLBACKS)
# Returns the JavaScript needed for a remote function.
# Takes the same arguments as link_to_remote.