Sha256: 888a3b3e8c8a68683ef1f062e5c8e76080c5b3f5b0bf9c1621f0df6e64b6a6a3
Contents?: true
Size: 307 Bytes
Versions: 10
Compression:
Stored size: 307 Bytes
Contents
module MenuHelper def menu(name) menu = Menu.find_or_create_by(name: name) html = '' menu.links.each do |l| if l.target_blank html << link_to(l.title, l.url, _target: '_blank') else html << link_to(l.title, l.url) end end html.html_safe end end
Version data entries
10 entries across 10 versions & 1 rubygems