<commit_before>get '/comment/new' do
  erb :'/comment/new'
end

post '/comment/new', auth: :user do
  params[:comment][:commentor] = current_user
  comment = Comment.new(params[:comment])
  unless comment.save
    set_error!("Something went wrong while saving your comment. Please try again.")
  end
end<commit_msg>add new comment route handler<commit_after>get '/comment/new' do
  erb :'/comments/new'
end

post '/comment/new' do
  comment = Comment.create(
    content: params[:comment][:content],
    story_id: params[:comment][:story_id],
    commentor_id: params[:comment][:commentor_id]
    )
  unless comment.save
    set_error!("Something went wrong while saving your comment. Please try again.")
  end
  redirect "/story/#{comment.story_id}"
end
{'fraction_non_alphanumeric': 0.13262599469496023, 'fraction_numerical': 0.0, 'mean_word_length': 4.471014492753623, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3680539', 'n_tokens_mistral': 234, 'n_tokens_neox': 233, 'n_words': 65}