pagination problem

Hi
     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 =>
:attach_file_ui,
                              :id => @sd_ticket } },
                                 %>
And pagination as
<%= will_paginate
@sd_attachments,:update=>'view_sd_attachment',:params=>{:controller=>'service_desk',:action=>'sd_attachment_pagination',:sd_id=>@sd_ticket},
: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 => @sd_ticket.id}},
{:class => 'itilbuttonlink1'}) %>

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

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

Sijo