ruby on rails - why is it dangerous to use find with will_paginate? -
ruby on rails - why is it dangerous to use find with will_paginate? -
i found next in faq after sorting out bug.
it’s possible trying paginate static array instead of performing paginated query in database. instance, chaining paginate phone call after active record find or methods wrong:
the above line homecoming desired result defeats purpose of pagination. here, find query first load records database, unsafe , should avoided.
my question why unsafe paginate find?
pagination meant prevent unnecessary db load: want elements db, load them.
using find load kind of sort.
dangerous
== heavy db load , potential crash.
ruby-on-rails ruby-on-rails-3 will-paginate
Comments
Post a Comment