search for: sd_ticket_number

Displaying 2 results from an estimated 2 matches for "sd_ticket_number".

2008 Mar 06
1
pagination for an object array
..._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) * items_per_page # step 2: instead of pe...
2008 May 19
0
changed to will_paginate
...# step 2: instead of performing the full find, just find the record count @search_sd_ticket_count_result = ServiceDeskTicket.find_where(:all,:select=>''count(*) as count1'' ) do |sd| sd.number.downcase =~ "%"+@sd_ticket_number.downcase+"%" if !@sd_ticket_number.nil? sd.service_desk_status_id== @sd_ticket_status_id sd.service_desk_priority_id== @sd_ticket_priority_id sd.primary_assignee== @sd_ticket_pri...