where in rails with more of two params -


i want system return hierarchical set defined variable, created connection, system has pagination of 15 in 15 elements per page, turns sets larger set if affirm element id == 21 has highest order appear @ beginning, before else, appears on page initially. here controller.

@services = service.where(active: true).page(params[:page]).per(15)

to increase question elements must obey attributes: active? , if highlighted.

i know how i, 'where', maintain pagination can hierarchically sort elements of total set.

for example:

in set have 125 elements, theys organized in 15 elements in paginations:

in home have 15 elements, second page 15 lements, tird page 15 elements ... in factor hierarquical. when change factor great element's position change great. if elment in 7ยช page , change factor hierarquical great page go great in firt page.


Comments