Class: Hash

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

Instance Method Summary collapse

Instance Method Details

#to_json_with_jsObject

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



343
344
345
# File 'lib/gridify/grid_view.rb', line 343

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