On Dec 3, 7:37 am, Petan Cert
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> Hi all,
>
> I am filtering products
>
> specs = Product.find(:all, :conditions => [ .... ], :order =>
"...")
> @products = specs.collect { |spec| spec.???? }
>
> And I would like to collect all of the product fields. I dont know what
> to use instead of my ????
>
Maybe I''ve misunderstood, but why can''t you do
@products = Product.find(:all, :conditions => [ .... ], :order =>
"...")
Fred>
> And then I would like to show them to the user.
>
> <% @products.each do |p| %>
> <%= p.name %> ....... <%= p.price %>
> <% end %>
>
> Thx for help.
> P.
> --
> Posted viahttp://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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---