<commit_before>module Dust
  class PostsController < AuthenticationController

    filter_access_to :all

    layout 'cms'

    def index
      @posts = Post.all
    end

    def new
      @post = Post.new_with_menu_item
    end

    def edit
      @post = Post.find(params[:id])
    end

    def create
      @post = Post.new_with_menu_item(params[:dust_post])

      if @post.save
        redirect_to front_end_post_path(@post.slug), notice: 'Post was successfully created.'
      else
        render action: "new"
      end
    end

    def update
      @post = Post.find(params[:id])

      if @post.update_attributes(params[:dust_post])
        redirect_to front_end_post_path(@post.slug), notice: 'Post was successfully updated.'
      else
        render action: "edit"
      end
    end

    def destroy
      @post = Post.find(params[:id])
      @post.destroy

      redirect_to posts_url
    end
  end
end<commit_msg>redirect to dust_posts after destroy<commit_after>module Dust
  class PostsController < AuthenticationController

    filter_access_to :all

    layout 'cms'

    def index
      @posts = Post.all
    end

    def new
      @post = Post.new_with_menu_item
    end

    def edit
      @post = Post.find(params[:id])
    end

    def create
      @post = Post.new_with_menu_item(params[:dust_post])

      if @post.save
        redirect_to front_end_post_path(@post.slug), notice: 'Post was successfully created.'
      else
        render action: "new"
      end
    end

    def update
      @post = Post.find(params[:id])

      if @post.update_attributes(params[:dust_post])
        redirect_to front_end_post_path(@post.slug), notice: 'Post was successfully updated.'
      else
        render action: "edit"
      end
    end

    def destroy
      @post = Post.find(params[:id])
      @post.destroy

      redirect_to dust_posts_url
    end
  end
end
{'fraction_non_alphanumeric': 0.08501594048884166, 'fraction_numerical': 0.0, 'mean_word_length': 2.35650623885918, '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': '2875736', 'n_tokens_mistral': 597, 'n_tokens_neox': 568, 'n_words': 147}