How do I validate uniqueness within a scope with a lambda function?

If you want to validate the uniqueness of a field with another field, you need to put the other field in the scope. So relative to session_id would be: validates_uniqueness_of :video_id, :scope => :session_id.

1 @Cyrus The takeaway here is that the scope isn't looking for an AR scope. ;) – coreyward Nov 20 at 3:13 Ah I wasn't even thinking that's what @Cyrus was doing! I can definitely see how that would be confusing.

– Beerlington Nov 20 at 3:19 Gotcha. Very helpful. I thought that I needed to provide a scope ... – Cyrus 2 days ago.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions