Hi Guys,
I’m using this helper
def nav_link_to(link, url, opts={})
if current_resource.url == url_for(url)
prefix = '<li class="active">'
else
prefix = '<li>'
end
prefix + link_to(link, url, opts) + "</li>"
end
It works great with this one
= nav_link_to '<i class="icon block layout green"></i>Dashboard', 'admin-live-dashboard.html'
= nav_link_to '<i class="icon block layout green"></i>Design Template', 'admin-live-design-template.html'
But is there any way I can write the code better and cleaner. This part is really way off to look at
nav_link_to '<i class="icon block layout green"></i>Dashboard',
Thanks in advance!