lib/pt_database.rb
#Replace some special characters with an _.
#(Or, for Ruby, use ActiveRecord for all db interaction!)
Replace some special characters with an _.
(Or, for Ruby, use ActiveRecord for all db interaction!)
Replace some special characters with an _ . ( Or for Ruby use ActiveRecord for all db interaction! )
def handle_special_characters(text)
        if text.include?("'") then
            text.gsub!("'","_")
        end
        if text.include?("\\") then
            text.gsub!("\\","_")
        end
        text
    end
def handle_special_characters ( text ) if text . include? ( "'" ) then text . gsub! ( "'" , "_" ) end if text . include? ( "\\" ) then text . gsub! ( "\\" , "_" ) end text end
Replace some special characters with an _.
Replace some special characters with an _ .
text
<not_specific>