Hi I have a tabbed view in the file show_details.rhtml as follows
attachments---contacts
<li><a href="#" rel="view_sd_attachment_details">Attachments</a></li> <li><a href="#" rel="view_sd_contact_details">Contacts</a></li> <div class="tabcontentstyle">
<div id="view_sd_attachment_details" class="tabcontent"> <%= render :partial => 'service_desk_part/view_sd_attachment_details'%> </div>
<div id="view_sd_contact_details" class="tabcontent"> <%= render :partial => 'service_desk_part/view_sd_contact_details' %> </div> </div>
When the page loads attachmens tab is highlightd..I have pagination for contacts(say 100 total contacts and pagination 20 item per page...And i implemented it with will_paginate)..BUT MY PROBLEM IS WHEN PAGINATING contacts THE NEXT PAGE COMES BUT ATTACHMENT TAB IS HIGHLIGHTED NOT THE CONTACT TAB ..AND ALL THE PAGE GET RELOADED AGAIN..HOW CAN I FIX THIS?
my controller as below
def show_details
@sd_ticket = ServiceDeskTicket.find(params[:id]) @sd_attachments=@sd_ticket.service_desk_attachments.paginate :page => params[:page], :per_page => 15 @sd_contacts=@sd_ticket.contacts.paginate :page => params[:page], :per_page => 20
end
In my view for contact (_view_sd_contact_details.rhtml) the pagination portion is <%= will_paginate @sd_contacts %>
Please help.. Sijo