Can someone clarify what type of object is returned from a find
(:select => ...) statement that only selects a subset of the records
columns?

If I have an object Foo with attributes A and B, and call find(:select
=> "A"), is the object that's returned still a Foo object?  Is it a
new Foo object?  Does it not have a B attribute (which would mean
there would exist more than one type for Foo)? or is the B attribute
simply nil?

Is there a way to replicate the behavior of the :select on an object -
to return an object that appears to be the same type but has a subset
of the attributes?

Thank you,
Andrew

--

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