def grouplist

@currentgroupid=Group.find_by_group_name(params[:group_name])
@currentgroupfriends=GroupFriend.find_all_by_user_id_and_group_id(current_user.id,@currentgroupid)

 format.html {redirect_to :back}

 end




Please check my controller and help me in solving my problem.

I need to get groupid from the group_name from groups table and
The list of friendid s for in the group created by the user which are
available in the groupfriends table.
My requirement
Ex : select friends from groupfriends where userid=current_user.id and
groupid=currentgroupid

Please help me in writing the above query in the controller in rails.

Thanks.
-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to