Hii
How can i pass array of values from the controller to partial.

def dispfriends
 @myfriend=[]
@myfriendlogin = []
@myusers=[]

i=0
 @currentgroup = Group.find_by_id(params[:groupid])

 puts @currentgroup.id

 @currentfriends=
GroupFriend.find_all_by_user_id_and_group_id(current_user.id,
@currentgroup.id)

 for n in @currentfriends
 @myfriend=n.friend_id
 puts @myfriend
 @myusers = User.find_by_id(@myfriend)
 @myfriendlogin[...@myusers.id
 puts @myfriendlogin[i]
i=i+1

end



I can print @myfriendlogin (id, name, address) individually and show the
value in the view. But,

My requirement is I need to pass complete @myusers array to my view.

Please help like how can i pass all the fields in @myusers.

Please help. thank you.
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to