1. Alexey Demidov
  2. bigdoorkit-ruby

Commits

Alexey Demidov  committed b367825

escape single quote

  • Participants
  • Parent commits 9111b62
  • Branches default

Comments (0)

Files changed (1)

File lib/big_door/resource.rb

View file
             $log.debug('update instance from response')
             response.each do |key, value|
                 key = 'resource_id' if key == 'id' 
+                value = value.to_s
+                value.gsub!(/'/, "\\\\'")
                 self.instance_eval("self.#{key} = \'#{value}\'")
                 $log.debug(sprintf "%s = %s", key, self.instance_eval("self.#{key}") )
             end