Displaying 1 result from an estimated 1 matches for "search_sd_ui_hash".
2008 Mar 06
1
pagination for an object array
...t.find(params[:id])
@servicedesk_cis = @sd_ticket.service_desk_cis
end
What I need is a pagination for @servicedesk_cis using the custom
pagination..How can i give offset and limit to this?
I have successfully done previously custom pagination in another def as
below
def search_sd_ticket
@search_sd_ui_hash=params[:sd_ticket]
@sd_ticket_number=@search_sd_ui_hash[:number]
@sd_ticket_name = @search_sd_ui_hash[:name]
# step 1: set the variables you''ll need
page = (params[:page] ||= 1).to_i
items_per_page = 20
offset = (page - 1) * item...