RailsCasts Pro episodes are now free!

Learn more or hide this

Jason Prins's Profile

GitHub User: jasonprins

Comments by Jason Prins

Avatar

Try this:

ruby
validates_uniqueness_of :slug, scope: :parent_id