Class: ActionView::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/locomotive/rails/action_view.rb

Overview

Instance Method Summary collapse

Instance Method Details

#json_escape(s) ⇒ Object Also known as: j



3
4
5
6
# File 'lib/locomotive/rails/action_view.rb', line 3

def json_escape(s)
  result = s.to_s.gsub('/', '\/')
  s.html_safe? ? result.html_safe : result
end