<commit_before># encoding: utf-8

require 'active_support/concern'

module NestedImage
  extend ActiveSupport::Concern

  def nested_image_path(represented)
    if represented.is_a?(StoryImage)
      api_story_story_image_path(represented.story, represented)
    elsif represented.is_a?(SeriesImage)
      api_series_series_image_path(represented.series, represented)
    elsif represented.is_a?(AccountImage)
      api_account_account_image_path(represented.account)
    elsif represented.is_a?(UserImage)
      api_user_user_image_path(represented.user)
    end
  end
end<commit_msg>do not load objects, just use the ids<commit_after># encoding: utf-8

require 'active_support/concern'

module NestedImage
  extend ActiveSupport::Concern

  def nested_image_path(represented)
    if represented.is_a?(StoryImage)
      api_story_story_image_path(represented.piece_id, represented.id)
    elsif represented.is_a?(SeriesImage)
      api_series_series_image_path(represented.series_id, represented.id)
    elsif represented.is_a?(AccountImage)
      api_account_account_image_path(represented.account_id)
    elsif represented.is_a?(UserImage)
      api_user_user_image_path(represented.user_id)
    end
  end
end
{'fraction_non_alphanumeric': 0.07343234323432343, 'fraction_numerical': 0.0016501650165016502, 'mean_word_length': 5.38421052631579, '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': '4320058', 'n_tokens_mistral': 401, 'n_tokens_neox': 382, 'n_words': 62}