Skip to content

Commit 53b3235

Browse files
author
Matt Swanson
committed
add uniqueness check for stories, closes stringer-rss#8
1 parent 57b1ee3 commit 53b3235

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/models/story.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
class Story < ActiveRecord::Base
44
belongs_to :feed
55

6+
validates_uniqueness_of :permalink
7+
68
UNTITLED = "[untitled]"
79

810
def headline

0 commit comments

Comments
 (0)