<commit_before>module Wiselinks
  module Headers    

  protected

    def wiselinks_layout
      'wiselinks'
    end

    def render(options = {}, *args, &block)
      if self.wiselinks_request?
        if options[:partial].blank? && self.wiselinks_partial_request?
          options[:partial] = action_name
        else
          options[:layout] = self.wiselinks_layout        
        end
      end

      super
    end

    def wiselinks_request?
      request.headers['X-Slide'].present?
    end

    def wiselinks_template_request?
      self.wiselinks_request? && request.headers['X-Slide'] != 'partial'
    end

    def wiselinks_partial_request?
      self.wiselinks_request? && request.headers['X-Slide'] == 'partial'
    end
  end
end<commit_msg>bugfixed for render<commit_after>module Wiselinks
  module Headers    

  protected

    def wiselinks_layout
      'wiselinks'
    end

    def render(options = {}, *args, &block)
      if self.wiselinks_request?
        if self.wiselinks_partial_request?
          options[:partial] ||= action_name
        else
          options[:layout] = self.wiselinks_layout        
        end
      end

      super
    end

    def wiselinks_request?
      request.headers['X-Slide'].present?
    end

    def wiselinks_template_request?
      self.wiselinks_request? && request.headers['X-Slide'] != 'partial'
    end

    def wiselinks_partial_request?
      self.wiselinks_request? && request.headers['X-Slide'] == 'partial'
    end
  end
end
{'fraction_non_alphanumeric': 0.09425133689839572, 'fraction_numerical': 0.0, 'mean_word_length': 2.4493087557603688, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1918536', 'n_tokens_mistral': 484, 'n_tokens_neox': 457, 'n_words': 90}