validates :item_code, :presence => true, :uniqueness => { :scope => user_id}try this way On Fri, Dec 23, 2011 at 3:32 PM, Dharmdip Rathod <[email protected]>wrote: > Dharmdip Rathod wrote in post #1037996: > > I had already gone through. so my reply was quick. > > > > :) > > By the way, > > Thanks All for quick reply and support. > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

