<commit_before>module ::Refinery
  module Admin
    class PagePartsController < ::Refinery::AdminController

      def new
        render '/refinery/admin/pages/page_part_field',
               :part => ::Refinery::PagePart.new(:title => params[:title], :body => params[:body]),
               :new_part => true,
               :part_index => params[:part_index]
      end

      def destroy
        part = ::Refinery::PagePart.find(params[:id])
        page = part.page
        if part.destroy
          page.reposition_parts!
          render :text => "'#{part.title}' deleted."
        else
          render :text => "'#{part.title}' not deleted."
        end
      end

    end
  end
end<commit_msg>Still need render :partial inside controllers<commit_after>module ::Refinery
  module Admin
    class PagePartsController < ::Refinery::AdminController

      def new
        render :partial => '/refinery/admin/pages/page_part_field', :locals => {
                 :part => ::Refinery::PagePart.new(:title => params[:title], :body => params[:body]),
                 :new_part => true,
                 :part_index => params[:part_index]
               }
      end

      def destroy
        part = ::Refinery::PagePart.find(params[:id])
        page = part.page
        if part.destroy
          page.reposition_parts!
          render :text => "'#{part.title}' deleted."
        else
          render :text => "'#{part.title}' not deleted."
        end
      end

    end
  end
end
{'fraction_non_alphanumeric': 0.1285329744279946, 'fraction_numerical': 0.0, 'mean_word_length': 2.0285132382892055, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '4891396', 'n_tokens_mistral': 408, 'n_tokens_neox': 403, 'n_words': 96}