Sha256: 45fe6134effaaf30c8e423c1fe08fb8c1a8127762cbc0438bd1258ffee0f79a4
Contents?: true
Size: 443 Bytes
Versions: 7
Compression:
Stored size: 443 Bytes
Contents
# frozen_string_literal: true module Decidim # A hasthag is used to categorize components class Hashtag < ApplicationRecord self.table_name = "decidim_hashtags" belongs_to :organization, foreign_key: "decidim_organization_id", class_name: "Decidim::Organization" validates :name, presence: true validates :name, uniqueness: { scope: [:decidim_organization_id] } HASHTAG_REGEX = /(^|\s)#([a-zA-Z0-9]\w*)/i end end
Version data entries
7 entries across 7 versions & 1 rubygems