Pārlūkot izejas kodu

Don't double-validate link

master
Adrian Short pirms 12 gadiem
vecāks
revīzija
d7b5e01804
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. +1
    -1
      app/models/feed.rb

+ 1
- 1
app/models/feed.rb Parādīt failu

@@ -6,6 +6,6 @@ class Feed
key :last_fetched, Time, :default => nil key :last_fetched, Time, :default => nil
timestamps! timestamps!


validates :title, :link, :presence => true
validates :title, :presence => true
validates_format_of :link, :with => URI::regexp(%w(http https)), :message => "must be a valid URL" validates_format_of :link, :with => URI::regexp(%w(http https)), :message => "must be a valid URL"
end end

Notiek ielāde…
Atcelt
Saglabāt