stefankroes/ancestry — pull request #191 by aderyabin (2014-05-27 07:31:20+00:00)
Title: Added possibility to set validation regexp pattern in model instead of g...

We use ancestry in our project for several models. One model uses UUID format as primary key (other uses integer by default). In this case we need to have separate `ANCESTRY_PATTERN` for this model. I suggest to define this constant in model instead of globally declaration.

Let's describe in example:

```ruby
class Category < ActiveRecord::Base
has_ancestry
end

class GlobalCategory < ActiveRecord::Base
# lets set pattern for UUID type
ANCESTRY_PATTERN = /\A[\w\-]+(\/[\w\-]+)*\z/
has_ancestry
end
```