Frederick Cheung wrote in post #1012069:
> On Jul 21, 9:43am, Joachim Cheng <[email protected]> wrote:
>> Hi, I am beginner RoR. I need your advanced programming...
>>
>> @rollresults = RollResult.where(:banker_id =>'3')
>
> So you want to  group your results by roll_no ?
>
> Fred

Yes, I want to result group by roll_no.

@rollresults = RollResult.where(:banker_id =>'3')
@rollresults.each do |p|
  if p.roll_no == '512'    #<--- Can't work
    # group by 3times..
  else
    # continues finding roll_no == '512'
  end
end

Can you teach me...?

-- 
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