Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/jquery/gridify/grid_view.rb

Instance Method Summary collapse

Instance Method Details

#to_json_with_jsObject

replace embedded ‘“javascript: foo”’ with ‘foo’



413
414
415
# File 'lib/jquery/gridify/grid_view.rb', line 413

def to_json_with_js
  self.to_json.gsub(/\"javascript: ([^"]*)\"/) { |string| string[1..-2].gsub('javascript:', '') }
end