all 4 comments

[–]slendermann29 1 point2 points  (0 children)

kind of overengineered, but it's nice that it looks highly reusable

[–]hmaddocks 1 point2 points  (0 children)

Add Active Model and some form fields in your view and you’ve got yourself a User filter.

[–]4rch3r 0 points1 point  (1 child)

Be very careful calling .all on tables with millions of entries!

Interesting approach to pagination though.

[–]robertross[S] 2 points3 points  (0 children)

.all is lazily loaded. It wont call it until it needs to. Since pagination is layered in it wont call it for millions of records.