<commit_before>class Post < ActiveRecord::Base
  attr_accessible :body, :title

  belongs_to :user, :touch => true
  has_many :comments

  include Garage::Representer

  property :id
  property :title
  property :body
  property :user, selectable: true

  collection :comments, selectable: true

  link(:self) { post_path(self) }
end<commit_msg>Add if: scope(:xxx) example to Post model in dummy app<commit_after>class Post < ActiveRecord::Base
  attr_accessible :body, :title

  belongs_to :user, :touch => true
  has_many :comments

  include Garage::Representer

  property :id
  property :title
  property :body, if: scope(:read_post_body)
  property :user, selectable: true

  collection :comments, selectable: true

  link(:self) { post_path(self) }
end
{'fraction_non_alphanumeric': 0.09881422924901186, 'fraction_numerical': 0.0, 'mean_word_length': 4.846153846153846, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1529084', 'n_tokens_mistral': 245, 'n_tokens_neox': 232, 'n_words': 72}