about summary refs log tree commit diff
path: root/app/lib/application_extension.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/lib/application_extension.rb')
-rw-r--r--app/lib/application_extension.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/lib/application_extension.rb b/app/lib/application_extension.rb
new file mode 100644
index 000000000..93c0f42f0
--- /dev/null
+++ b/app/lib/application_extension.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+module ApplicationExtension
+  extend ActiveSupport::Concern
+
+  included do
+    validates :website, url: true, unless: 'website.blank?'
+  end
+end