<commit_before>class LtiLinksController < ApplicationController

	def create
		key_id = params[:keyset_id].to_i
		@key_set = BasicLtiKey.find(key_id)
		if (@key_set == nil)
			#redirect
		end
		@key_set.used = true
		@key_set.save<commit_msg>changed to find_by_id to avoid ActiveRecord::RecordNotFound error<commit_after>class LtiLinksController < ApplicationController

	def create
		key_id = params[:keyset_id].to_i
		@key_set = BasicLtiKey.find_by_id(key_id)
		if (@key_set == nil)
			#redirect
		end
		@key_set.used = true
		@key_set.save
{'fraction_non_alphanumeric': 0.0959409594095941, 'fraction_numerical': 0.0, 'mean_word_length': 4.967032967032967, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4924609', 'n_tokens_mistral': 215, 'n_tokens_neox': 196, 'n_words': 39}