search for: chop_em

Displaying 1 result from an estimated 1 matches for "chop_em".

2006 Mar 24
2
Return all rows, split then show uniques
.... apple peach lime What I want to do with that data is use the .split method to divide them into separate values in an array, then use the .uniq method to return a unique list of the words like so: apple, banana, pear, melon, peach, lime So in my controller I have: def taglist @tags = Tag.chop_em(params[:tag]) end and in my model I know I need something: def self.chopem(tag) Tag.find(:all) end I think I lack the understanding of how the array that comes back from the database is constructed. Can anyone explain this so I can chop those words up and sort them with the .uniq method? Apo...