Samiron Rony wrote:
> Assuming the followings:
> - Your Search model have a column "word"
> - @top_search is a array with 3 latest search result, where each
> element have a :word
> - You want to join words from these 3 search objects
>
> Then you just can do as following:
> @top_search.map(&:word).join(',')
>
> Hope it will work if my assumptions are correct :)
Great thanks :)
--
Posted via http://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 [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.