On Feb 3, 2009, at 11:24 AM, Little Known wrote:

Jim Gay wrote:
On Feb 3, 2009, at 11:12 AM, Little Known wrote:

tag 'kids:kid_sport_list' do |tag|
  kid = tag.locals.kid
  kid.sports.each do |sport|
  %{#{sport.name})
  end
end

For some reason this outputs a "#" for each sport in kid.sports
instead
of the name... Would anyone know why?

looks like you have a ) where you should have a }

That's just a result of me typing wrong on this forum, not causing the
problem. Its correct in my code.


tag 'kids:kid_sport_list' do |tag|
  kid = tag.locals.kid
  result = []
  kid.sports.each do |sport|
    result << sport.name
  end
  result.join(' ')
end

_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to