_scripts/import_comments.rb
# Converts the contents of a comment from the database into hash suitable for 
# posting as a comment to Disqus
Converts the contents of a comment from the database into hash suitable for
posting as a comment to Disqus
Converts the contents of a comment from the database into hash suitable for posting as a comment to Disqus
def convert(row)
    { 
      :author_name  => row[:comment_author],
      :author_email => row[:comment_author_email],
      :author_url   => row[:comment_author_url],
      :ip_address   => row[:comment_author_IP],
      :created_at   => row[:comment_date].strftime("%Y-%m-%dT%H:%M"),
      :message      => clean(row[:comment_content])
    }
end
def convert ( row ) { :author_name => row [ :comment_author ] , :author_email => row [ :comment_author_email ] , :author_url => row [ :comment_author_url ] , :ip_address => row [ :comment_author_IP ] , :created_at => row [ :comment_date ] . strftime ( "%Y-%m-%dT%H:%M" ) , :message => clean ( row [ :comment_content ] ) } end
Converts the contents of a comment from the database into hash suitable for
posting as a comment to Disqus
Converts the contents of a comment from the database into hash suitable for posting as a comment to Disqus
row