about summary refs log tree commit diff
path: root/app/lib/application_extension.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-01-15 14:04:56 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-01-15 14:04:56 +0100
commitbfec9aaee077c6dd54081a89f697271d7a5c0a6a (patch)
treeececd729f513fd14998f2be30169973956ef6f59 /app/lib/application_extension.rb
parent1f7c0ad8d3d336b036d16272716e41812f65f5d9 (diff)
parente9737c2235ec56502e650bd1adad3f32bf85f0ef (diff)
Merge branch 'ineffyble-feature/toot-app-source'
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