<commit_before>class Admin::EthtransactionsController < Admin::BaseController
  skip_load_and_authorize_resource
  load_and_authorize_resource
  
  def destroy
    @ethtransaction = Ethtransaction.find(params[:id])
    if @ethtransaction.confirmed == false
      if @ethtransaction.activity.nil?
        @ethtransaction.destroy
        redirect_to '/admin'
      end
    end
  end

end<commit_msg>can destroy ethtransactions with activities<commit_after>class Admin::EthtransactionsController < Admin::BaseController
  skip_load_and_authorize_resource
  load_and_authorize_resource
  
  def destroy
    @ethtransaction = Ethtransaction.find(params[:id])
    if @ethtransaction.confirmed == false
      if @ethtransaction.activity.nil?
        @ethtransaction.destroy
        redirect_to '/admin'
      else
        @ethtransaction.activity.destroy
        @ethtransaction.destroy
        redirect_to '/admin'
      end
    end
  end

end
{'fraction_non_alphanumeric': 0.07043756670224119, 'fraction_numerical': 0.0, 'mean_word_length': 3.5533980582524274, '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': '1557075', 'n_tokens_mistral': 292, 'n_tokens_neox': 282, 'n_words': 50}