<commit_before>module Kennedy
  module ApplicationHelper

    def render_template template, record
      begin
        render "Kennedy/posts/templates/#{template}", template: template, record: record
      rescue
        render "kennedy/posts/templates/custom", template: template, record: record
      end
    end

    def link_to_preview(post, options={})
      options[:method] = :post
      options[:target] = '_blank'
      link_to "#{icon_tag('icon-eye-open')} Preview".html_safe, preview_post_path(post, post: post.attributes.merge(contents: post.contents.map(&:attributes))), options
    end

  end
end<commit_msg>fixed bug with overidden methods<commit_after>module Kennedy
  module ApplicationHelper

    def link_to_preview(post, options={})
      options[:method] = :post
      options[:target] = '_blank'
      link_to "#{icon_tag('icon-eye-open')} Preview".html_safe, main_app.preview_post_path(post, post: post.attributes.merge(contents: post.contents.map(&:attributes))), options
    end

  end
end
{'fraction_non_alphanumeric': 0.11932938856015779, 'fraction_numerical': 0.0, 'mean_word_length': 4.100502512562814, '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': '239097', 'n_tokens_mistral': 301, 'n_tokens_neox': 293, 'n_words': 67}