Mohit Sindhwani wrote:
 tag "aggregate_snippet" do |tag|
raise "`snippet_name' attribute required" unless tag.attr["snippet_name"]
   if name = tag.attr['snippet_name']
     if snippet = Snippet.find_by_name(name.strip) #snippet was found..
urls = snippet.content.split(";").map(&:strip).reject(&:blank?).map { |u| clean_url u }
     parent_ids = urls.map {|u| Page.find_by_url(u) }.map(&:id)
   tag.locals.parent_ids = parent_ids
   tag.expand
 end
In the lines above,
    if snippet = Snippet.find_by_name(name.strip) #snippet was found..
should be:
if snippet = Snippet.find_by_name(snippet_name.strip) #snippet was found..


Cheers,
Mohit.
5/27/2009 | 1:03 AM.

_______________________________________________
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