<commit_before>class Admin::SnippetsController < Admin::BaseController
  resource_controller

  def create_draft
    @snippet = Snippet.create!
    redirect_to edit_admin_snippet_url(@snippet.id)
  end

  update.response do |wants|
    wants.html { redirect_to collection_url }
  end

  update.after do
    Rails.cache.delete('snippets')
  end

  create.response do |wants|
    wants.html { redirect_to collection_url }
  end

  create.after do
    Rails.cache.delete('snippets')
  end

end<commit_msg>Removed resource_controller<commit_after>class Admin::SnippetsController < Admin::ResourceController
  update.after :expire_cache
  create.after :expire_cache

  def create_draft
    @snippet = Snippet.create!
    redirect_to edit_admin_snippet_url(@snippet.id)
  end

  def expire_cache
    Rails.cache.delete('snippets')
  end
end
{'fraction_non_alphanumeric': 0.0815347721822542, 'fraction_numerical': 0.0, 'mean_word_length': 4.318471337579618, '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': '3510392', 'n_tokens_mistral': 279, 'n_tokens_neox': 267, 'n_words': 53}