We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8f25bf commit a514b3fCopy full SHA for a514b3f
app/models/custom_link.rb
@@ -2,9 +2,9 @@ class CustomLink < ApplicationRecord
2
belongs_to :casa_org
3
# Validate that the URL is present, has a valid format, and is unique
4
validates :url, presence: true,
5
- format: { with: /\A#{URI::DEFAULT_PARSER.make_regexp(%w[http https])}\z/, message: 'must be a valid URL' }
+ format: {with: /\A#{URI::DEFAULT_PARSER.make_regexp(%w[http https])}\z/, message: "must be a valid URL"}
6
# Validate that the title is present and has a maximum length of 255 characters
7
- validates :text, presence: true, length: { maximum: 255 }
+ validates :text, presence: true, length: {maximum: 255}
8
9
scope :active, -> { where(active: true) }
10
end
0 commit comments