Sorry for this simple question but I am stuck here.
I am trying to create a helper method that simply prints for each object the attribute "name" of my Table "Term".
I tried this:
def display_name(terms)
terms.each do |term|
p term.name
end
end
But instead of printing each objects name, it prints an array for each object with all attributes.
As an example:
[#<Term id: 1, name: "test", definition: "first definition", created_at: "2011-07-21 14:52:12", updated_at: "2011-07-21 14:52:12">,
#<Term id: 2, name: "second test", definition: "blabla", created_at: "2011-07-20 18:00:42", updated_at: "2011-07-20 18:04:15">
I am trying to find what I can do with the documentation (content_tag, concat, collect) but it doesn't seem to provide the result I want..
Thanks for your explanation