find is a class method, not an instance method.

Change
  b = @mystuff.find(:all, :select => 'mp1')
to
  b = Stuff.find(:all, :select => 'mp1')

Note: 'b' will be an array of ActiveRecords with only the mp1 attribute set.
If you want an array of strings, add:

b = b.map{|rec| rec.mp1}

HTH,
  Jeffrey

Quoting Mark Preston <[email protected]>:
[snip]
>   def m
>     @mystuff =Stuff.new
> 
>    b = @mystuff.find( :all, :select => 'mp1')
>    puts "mp1 has the following values: #{b}"
> 
>   end

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