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 fc6f171 commit 7733a59Copy full SHA for 7733a59
app/models/news.rb
@@ -1,9 +1,9 @@
1
class News < ApplicationRecord
2
- scope :recent, -> { order(published_at: :desc) }
+ scope :recent, -> { order(published_at: :desc) }
3
4
- validates :title, presence: true
5
- validates :url, presence: true,
6
- uniqueness: true,
7
- format: { with: /\Ahttps?:\/\/.*\z/i }
8
- validates :published_at, presence: true
+ validates :title, presence: true
+ validates :url, presence: true,
+ uniqueness: true,
+ format: { with: /\Ahttps?:\/\/.*\z/i }
+ validates :published_at, presence: true
9
end
0 commit comments