<commit_before>class Suggestion
  include Mongoid::Document
  include Mongoid::Timestamps

  field :message, :type => String

  belongs_to :sender, :class_name => "User"
  belongs_to :receiver, :class_name => "User"
  belongs_to :place

  validates_presence_of :sender
  validates_presence_of :receiver
  validates_presence_of :place


  def self.find_suggested_for_user(user, start=0, count = 20)
    Suggestion.where(:receiver_id => user.id).
        skip(start).
        limit(count)
  end


  def as_json(options={})
    attributes.merge(:sender => self.sender).merge(:place => self.place)
  end
end<commit_msg>consider the place attached to a suggestion a detail<commit_after>class Suggestion
  include Mongoid::Document
  include Mongoid::Timestamps

  field :message, :type => String

  belongs_to :sender, :class_name => "User"
  belongs_to :receiver, :class_name => "User"
  belongs_to :place

  validates_presence_of :sender
  validates_presence_of :receiver
  validates_presence_of :place


  def self.find_suggested_for_user(user, start=0, count = 20)
    Suggestion.where(:receiver_id => user.id).
        skip(start).
        limit(count)
  end


  def as_json(options={})
    attributes.merge(:sender => self.sender).merge(:place => self.place.as_json({:detail_view => true}))
  end
end
{'fraction_non_alphanumeric': 0.11222136817832437, 'fraction_numerical': 0.004611837048424289, 'mean_word_length': 4.380165289256198, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 16, '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': '5075511', 'n_tokens_mistral': 447, 'n_tokens_neox': 429, 'n_words': 94}