<commit_before>module HyperAdmin
  class ResourceController < ActionController::Base
    before_action :set_resource_class

    def index
      @resources = resource_class.all
      render 'admin/resources/index'
    end

    def show
      @resource = resource
      render 'admin/resources/show'
    end

    def new
      @resource = resource
      render 'admin/resources/new'
    end

    def edit
      @resource = resource
      render 'admin/resources/edit'
    end

    def create
    end

    def update
    end

    def destroy
    end

    def resource
      resource_class.find params[:id]
    end

    def resource_class
      raise "This method must be overridden"
    end

    protected

    def set_resource_class
      @resource_class = resource_class
    end
  end
end
<commit_msg>Render correct layout for resources<commit_after>module HyperAdmin
  class ResourceController < ActionController::Base
    before_action :set_resource_class

    def index
      @resources = resource_class.all
      render 'admin/resources/index', layout: layout
    end

    def show
      @resource = resource
      render 'admin/resources/show', layout: layout
    end

    def new
      @resource = resource
      render 'admin/resources/new', layout: layout
    end

    def edit
      @resource = resource
      render 'admin/resources/edit', layout: layout
    end

    def create
    end

    def update
    end

    def destroy
    end

    def resource
      resource_class.find params[:id]
    end

    def resource_class
      raise "This method must be overridden"
    end

    protected

    def set_resource_class
      @resource_class = resource_class
    end

    def layout
      'hyper_admin/application'
    end
  end
end

{'fraction_non_alphanumeric': 0.05223880597014925, 'fraction_numerical': 0.0, 'mean_word_length': 2.257943925233645, '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': '3417610', 'n_tokens_mistral': 494, 'n_tokens_neox': 466, 'n_words': 148}