Skip to content
Browse files

Merge pull request #171 from pjg/patch-1

Add scoped uniqueness example to README
  • Loading branch information...
2 parents fdf3350 + 671c0ec commit c8e3f09ca8de14838616b301f0c03eb97ff82c56 @drapergeek drapergeek committed Oct 19, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 README.md
1 README.md
@@ -27,6 +27,7 @@ Matchers to test validations and mass assignments:
describe Post do
it { should validate_uniqueness_of(:title) }
+ it { should validate_uniqueness_of(:title).scoped_to(:user_id, :category_id) }
it { should validate_presence_of(:body).with_message(/wtf/) }
it { should validate_presence_of(:title) }
it { should validate_numericality_of(:user_id) }

0 comments on commit c8e3f09

Please sign in to comment.
Something went wrong with that request. Please try again.