stefankroes / ancestry

Organise ActiveRecord model into a tree structure
MIT License
3.72k stars 458 forks source link

Add default ancestry format and primary key format #612

Closed kbrock closed 1 year ago

kbrock commented 1 year ago

These tend to be the same across a whole database.

The primary key format is used for databases with uuids for the primary key The ancestry format makes it easy for a new user to get up and running using a different ancestry encoding format

kbrock commented 1 year ago

@kshnurov do you know how to use mattr_accessor here?

I feel this is probably the easiest way to get users up and running using the new materialized path2.

kbrock commented 1 year ago

if you have an answer, we can circle back later. I want to get this merged, so I can use it in documenting ancestry collation and get us closer to a gem release

kshnurov commented 1 year ago

You're instantly merging things left and right without even thinking and reviewing. What the hell is going on?

kbrock commented 1 year ago

I wanted to simplify our readme and this made it easier. Yes, I did find a bug after the fact. I am putting in a PR to fix.