search for: find_by_userid

Displaying 2 results from an estimated 2 matches for "find_by_userid".

Did you mean: find_by_user_id
2006 Nov 04
0
Need help with iterating through a ''find'' result
...mber entries. I do this all the time in Perl.. I plan to index the hash to get the status as I iterate through the forums in the view. So I''m trying to do something like this: def list @forums = Forum.find_by_user(@session[''user''].id) forummembers = ForumMember.find_by_userid(@session[''user''].id) forummembers.each {|fm| @forummember[fm.forumid] = fm} @userid = @session[''user''].id end But ruby won''t let me use the ''.each''. I''m hoping you will be able to follow what I''m trying to do...
2006 Nov 04
0
Basic Q: Please help with iterating through an AR.find result
...mber entries. I do this all the time in Perl.. I plan to index the hash to get the status as I iterate through the forums in the view. So I''m trying to do something like this: def list @forums = Forum.find_by_user(@session[''user''].id) forummembers = ForumMember.find_by_userid(@session[''user''].id) forummembers.each {|fm| @forummember[fm.forumid] = fm} @userid = @session[''user''].id end But Ruby tells me the method ''each'' is missing! Can anyone tell me why? I thought the .find returned an array of objects, wh...