aglushkov / serega

MIT License
7 stars 0 forks source link

Rename batch loader :key option and :default_key config option to :id and :default_id #139

Closed aglushkov closed 11 months ago

aglushkov commented 11 months ago

It must have :id value by default.

We should add specific error message if object does not respond to :id with example how to change this default value.

User can change id manually:

config.batch.default_id = :another_id # or some callable
attribute :comments_count, batch: { loader: SomeLoader, id: :another_id }
aglushkov commented 11 months ago

We now use :id_method instead of batch :key and :default_key options. Added in v 0.18.0