fixed the specs.

This commit is contained in:
danielgrippi 2011-07-05 11:29:45 -07:00
parent 5f592f9616
commit f5e3c4c0d7

View file

@ -9,6 +9,35 @@ module AspectGlobalHelper
end
end
def aspect_badges(aspects, opts={})
str = ''
aspects.each do |aspect|
str << aspect_badge(aspect, opts)
end
str.html_safe
end
def aspect_badge(aspect, opts={})
str = "<span class='aspect_badge single'>"
link = opts.delete(:link)
if !link
str << link_to(aspect.name, "#", 'data-guid' => aspect.id, :class => 'hard_aspect_link').html_safe
else
str << link_for_aspect(aspect).html_safe
end
str << "</span>"
end
def aspect_links(aspects, opts={})
str = ""
aspects.each do |aspect|
str << '<li>'
str << link_for_aspect(aspect, :params => opts, 'data-guid' => aspect.id, :class => 'hard_aspect_link').html_safe
str << '</li>'
end
str.html_safe
end
def link_for_aspect(aspect, opts={})
opts[:params] ||= {}
params ||= {}