bogdan / datagrid

Gem to create tables grids with sortable columns and filters
MIT License
1.02k stars 115 forks source link

Optimizing Single Authorization Check #318

Closed MehmetCelik4 closed 8 months ago

MehmetCelik4 commented 8 months ago

Hey,

Currently, the authorization check (can? method) is called repeatedly for each record in the grid, leading to performance concerns.

I'd like to optimize this by performing the authorization check just once and then applying it across all records. Any suggestions on how to best approach this.

Thanks in advance!

bogdan commented 8 months ago

Authorization check is not a part of datagrid. So, please share your grid source code if you need some help

MehmetCelik4 commented 8 months ago

thanks, man :), i figured it out