Re: [Rails] rails 3 helpers

2010-12-20 Thread Mahmoud Said
Because you are returnning the helpers as strings, values... not function calls. remove the encapsulating double quotes so that * html link_to( image_tag('icons/rss_#{rss[0]}.png'), rss[1], :disabled = #{rss[2]})* will be * html link_to(image_tag('icons/rss_#{rss[0]}.png'), rss[1],

[Rails] rails 3 helpers

2010-12-19 Thread Me
This code outputs html to the page not the icons, ideas? def pub_social_links(pub) html = twit = pub.twitter.blank? ? ['off',#{pub.twitter},'disabled'] : ['on','',''] rss = pub.rss.blank? ? ['off',#{pub.rss},'disabled'] : ['on',''] fb = pub.facebook.blank? ?