Sfoglia il codice sorgente

Cascade delete posts when a feed is deleted

master
Adrian Short 12 anni fa
parent
commit
0facefb0bb
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      app/models/feed.rb

+ 1
- 1
app/models/feed.rb Vedi File

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

many :posts
many :posts, :dependent => :destroy

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


Caricamento…
Annulla
Salva