pagination problem

     I have a partial file _view_sd_attachments.rhtml.In that a
link_to_remote is there also pagination code is there
<%= link_to_remote "Attach a file",
       {:update => "view_sd_attachment",
        :url => {:controller => 'service_desk', :action =>
                              :id => @sd_ticket } },
And pagination as
<%= will_paginate
:container => false %>

I am using pagination ajaxway .This is working..when i click on
link_to_remote "Attach File" that page(attach_file_ui.rhtml) loads..Upto
this everything ok..Now my problem starts.I have a cancel button in
attach_file_ui file
<%= link_to_remote( "Cancel",
   {:update => "sd_attachment_ui",
:url => {:controller => 'service_desk', :action =>
'sd_attach_file_cancel', :id =>}},
{:class => 'itilbuttonlink1'}) %>

def sd_attach_file_cancel
      puts params[:page]
      @sd_ticket= ServiceDeskTicket.find(params[:id])
   render :partial => 'service_desk_part/view_sd_attachment_details',
:locals => {:sd_attachments => @sd_attachments, :sd_ticket =>

But this gives the error
Showing app/views/service_desk_part/_view_sd_attachment_details.rhtml
where line #155 raised:
undefined method `offset' for ServiceDeskAttachment:Class

How can I solve this?Please help