<commit_before># Managems of offer-type posts
#
class OffersController < PostsController
  before_action :ensure_organization, only: :dashboard

  def dashboard
    @offers = Category.all
              .sort_by { |a| a.name.downcase }
              .each_with_object({}) do |category, offers|
      list = current_organization.offers.merge(category.posts).limit(5)
      offers[category] = list if list.present?<commit_msg>respect hound happiness or it will bark at us<commit_after># Managems of offer-type posts
#
class OffersController < PostsController
  before_action :ensure_organization, only: :dashboard

  def dashboard
    @offers = Category.all.sort_by { |a| a.name.downcase }.
              each_with_object({}) do |category, offers|
      list = current_organization.offers.merge(category.posts).limit(5)
      offers[category] = list if list.present?
{'fraction_non_alphanumeric': 0.0996523754345307, 'fraction_numerical': 0.002317497103128621, 'mean_word_length': 3.6956521739130435, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5091002', 'n_tokens_mistral': 260, 'n_tokens_neox': 253, 'n_words': 64}