Skip to content
Snippets Groups Projects
Commit e22cfe8c authored by ArtOfCode-'s avatar ArtOfCode-
Browse files

Uniqueness for warning templates

parent 0da66e68
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,8 @@ require 'base64'
class WarningTemplate < ApplicationRecord
include CommunityRelated
validate :name, uniqueness: { scope: [:community_id] }
def body_as_b64
body_with_site_replacements = body.gsub '$SiteName', SiteSetting['SiteName']
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment