<commit_before>module GraphStarter
  module ApplicationHelper
    def asset_path(asset, options = {})
      graph_starter.asset_path({id: asset, model_slug: asset.class.model_slug}.merge(options))
    end

    def engine_view(&b)
       yield eval("__FILE__.gsub(Rails.root.to_s, GraphStarter::Engine.root.to_s)",b.binding) 
    end

    def render_body(asset, model_slug)
      views = Dir.glob(Rails.root.join("app/views/#{model_slug}/_body.html.*"))

      partial_path = views.present? ? "#{model_slug}/body" : 'body'

      render partial: partial_path, locals: {asset: asset}
    end

    def present_asset(object)
      yield(AssetPresenter.new(object, self)) if block_given?
    end

    def app_user_is_admin?
      current_user && current_user.respond_to?(:admin?) && current_user.admin?
    end

    def app_user
      defined?(:current_user) ? current_user : nil
    end

    def missing_image_tag
      @missing_image_tag ||= image_tag 'missing'
    end
  end
end<commit_msg>Fix missing image error (hopefully)<commit_after>module GraphStarter
  module ApplicationHelper
    def asset_path(asset, options = {})
      graph_starter.asset_path({id: asset, model_slug: asset.class.model_slug}.merge(options))
    end

    def engine_view(&b)
       yield eval("__FILE__.gsub(Rails.root.to_s, GraphStarter::Engine.root.to_s)",b.binding) 
    end

    def render_body(asset, model_slug)
      views = Dir.glob(Rails.root.join("app/views/#{model_slug}/_body.html.*"))

      partial_path = views.present? ? "#{model_slug}/body" : 'body'

      render partial: partial_path, locals: {asset: asset}
    end

    def present_asset(object)
      yield(AssetPresenter.new(object, self)) if block_given?
    end

    def app_user_is_admin?
      current_user && current_user.respond_to?(:admin?) && current_user.admin?
    end

    def app_user
      defined?(:current_user) ? current_user : nil
    end

    def missing_image_tag
      @missing_image_tag ||= image_tag 'missing.png'
    end
  end
end
{'fraction_non_alphanumeric': 0.11738261738261738, 'fraction_numerical': 0.0, 'mean_word_length': 3.5316742081447963, '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': '5004111', 'n_tokens_mistral': 673, 'n_tokens_neox': 660, 'n_words': 125}