From: raffir@... Date: 2006-07-24T00:35:14+09:00 Subject: Re: Showing similar values in a table Unfortunately, while it's now showing accounts, it's now showing every single account. I'd just like it to show accounts with the same name as the session user's. Thanks, - Raffi. Jan Svitok wrote: > Hi, > > On 7/23/06, raffir@gmail.com wrote: > > I'm working on a project in which Accounts belong to a User. > > > > <%@session['user'].accounts.each do |i| %> > > <%Accounts.find(:all, conditions = ["coursename LIKE ?", > > "%#{i.coursename}%"])%> > > You're missing second 'each' here > <%Accounts.find(:all, conditions = ["coursename LIKE ?", > "%#{i.coursename}%"]).each do |account| %> > > > > > > > > > > > > >
<%= account.name %><%= account.number %><%= account.user_id%>
> > <%end%> > > > > <% end %>