Hi,
I have a function in my model like
-----------------------------------------
class Pattern
def self.get_all(field)
@patterns = Pattern.find(:all)
@patterns.collect do |pp|
pp.field
end
end
end
-----------------------------------------
so that whatever field i give to the function,
it returns all the column values in an Array
I dont know whether i am doing it right or not
Any suggestions
Thanx,
Vimal Das
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---