<commit_before>module API
  module V1
    class PlaceResource < JSONAPI::Resource

      attributes :name, :place_type, :geometry

      def place_type
        @model.type
      end

      def geometry
        @model.to_geojson
      end

    end
  end
end<commit_msg>Add neighborhood id collection so frontend can query municipality and all its neighborhoods as a filter<commit_after>module API
  module V1
    class PlaceResource < JSONAPI::Resource

      attributes :name, :place_type, :geometry, :neighborhood_ids

      def place_type
        @model.type
      end

      def geometry
        @model.to_geojson
      end

      def neighborhood_ids
        return [] if @model.type == 'Neighborhood'
        @model.neighborhoods.pluck(:id)
      end

    end
  end
end
{'fraction_non_alphanumeric': 0.059431524547803614, 'fraction_numerical': 0.002583979328165375, 'mean_word_length': 2.354978354978355, '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': '5986007', 'n_tokens_mistral': 228, 'n_tokens_neox': 213, 'n_words': 67}