not getting new updated data while using AJAX in calling partial file

Posted by dharin on Stack Overflow See other posts from Stack Overflow or by dharin
Published on 2009-08-22T13:56:24Z Indexed on 2010/03/14 19:05 UTC
Read the original article Hit count: 213

Filed under:
|
|
|
|

I have called the partial file form the loop. now when i update , i do not actually get updated result but need to do refresh for getting updated result. the code is like this :

the file1

  @folders.each do |@folder|
  = render :partial => 'folders/group_list'

the partial file

%div{:id => "group_list_#{@folder.id}"}  // this is the div which needs to be updated
  = group_member(@folder)   //this is the helper method

I need the updated @folder from controller but I always get file1's @folder

controller side

def any_method
  ..
  some code
  ..
  @folder = Folder.find(params[:folder_id])
  render :partial => '/folders/group_list'
end

© Stack Overflow or respective owner

Related posts about AJAX

Related posts about div