ruby on rails - validates_uniqueness_of scoped to multiple columns -


When using Validates_uniqueness_of with the scope option, it is valid to pass an array of such columns:

Validations_Nick_Expression: x ,: scope = & gt; [: Y ,: z]

As I want: x should be unique in terms of both: y and: z If not, how can you get it? 2 Verification is one for each field?

Thank you

Yes, it is valid and your syntax is actually to get it The way is to look for more details.


Comments

Popular posts from this blog

c# - PInvoke of NetUserAdd returns 24 -

NHibernate Passing Session to the Repository -

objective c - Mouse events for an NSSegmentedCell subclass? -