Skip to content
This repository
Browse code

Qualify toplevel constant references since we're in a BasicObject

  • Loading branch information...
commit be7e21a85c487b6f3bfc2e393387ada5cc52290d 1 parent da3a80d
Jeremy Kemper jeremy authored

Showing 1 changed file with 7 additions and 7 deletions. Show diff stats Hide diff stats

  1. +7 7 actionpack/lib/action_view/helpers/prototype_helper.rb
14 actionpack/lib/action_view/helpers/prototype_helper.rb
@@ -686,7 +686,7 @@ def [](id)
686 686 # Returns an object whose <tt>to_json</tt> evaluates to +code+. Use this to pass a literal JavaScript
687 687 # expression as an argument to another JavaScriptGenerator method.
688 688 def literal(code)
689   - ActiveSupport::JSON::Variable.new(code.to_s)
  689 + ::ActiveSupport::JSON::Variable.new(code.to_s)
690 690 end
691 691
692 692 # Returns a collection reference by finding it through a CSS +pattern+ in the DOM. This collection can then be
@@ -973,7 +973,7 @@ def drop_receiving(id, options = {})
973 973 def loop_on_multiple_args(method, ids)
974 974 record(ids.size>1 ?
975 975 "#{javascript_object_for(ids)}.each(#{method})" :
976   - "#{method}(#{ActiveSupport::JSON.encode(ids.first)})")
  976 + "#{method}(#{::ActiveSupport::JSON.encode(ids.first)})")
977 977 end
978 978
979 979 def page
@@ -997,7 +997,7 @@ def render(*options_for_render)
997 997 end
998 998
999 999 def javascript_object_for(object)
1000   - ActiveSupport::JSON.encode(object)
  1000 + ::ActiveSupport::JSON.encode(object)
1001 1001 end
1002 1002
1003 1003 def arguments_for_call(arguments, block = nil)
@@ -1139,7 +1139,7 @@ def append_to_function_chain!(call)
1139 1139 class JavaScriptElementProxy < JavaScriptProxy #:nodoc:
1140 1140 def initialize(generator, id)
1141 1141 @id = id
1142   - super(generator, "$(#{ActiveSupport::JSON.encode(id)})")
  1142 + super(generator, "$(#{::ActiveSupport::JSON.encode(id)})")
1143 1143 end
1144 1144
1145 1145 # Allows access of element attributes through +attribute+. Examples:
@@ -1213,7 +1213,7 @@ def each_slice(variable, number, &block)
1213 1213 enumerate :eachSlice, :variable => variable, :method_args => [number], :yield_args => %w(value index), :return => true, &block
1214 1214 else
1215 1215 add_variable_assignment!(variable)
1216   - append_enumerable_function!("eachSlice(#{ActiveSupport::JSON.encode(number)});")
  1216 + append_enumerable_function!("eachSlice(#{::ActiveSupport::JSON.encode(number)});")
1217 1217 end
1218 1218 end
1219 1219
@@ -1234,7 +1234,7 @@ def inject(variable, memo, &block)
1234 1234
1235 1235 def pluck(variable, property)
1236 1236 add_variable_assignment!(variable)
1237   - append_enumerable_function!("pluck(#{ActiveSupport::JSON.encode(property)});")
  1237 + append_enumerable_function!("pluck(#{::ActiveSupport::JSON.encode(property)});")
1238 1238 end
1239 1239
1240 1240 def zip(variable, *arguments, &block)
@@ -1298,7 +1298,7 @@ def append_enumerable_function!(call)
1298 1298
1299 1299 class JavaScriptElementCollectionProxy < JavaScriptCollectionProxy #:nodoc:\
1300 1300 def initialize(generator, pattern)
1301   - super(generator, "$$(#{ActiveSupport::JSON.encode(pattern)})")
  1301 + super(generator, "$$(#{::ActiveSupport::JSON.encode(pattern)})")
1302 1302 end
1303 1303 end
1304 1304 end

0 comments on commit be7e21a

Please sign in to comment.
Something went wrong with that request. Please try again.