module ApplicationHelper def nav_link(name, path, options = {}) (<<-HTML).html_safe
  • #{link_to name, path}
  • HTML end def yes_no(bool) if bool 'Yes'.html_safe else 'No'.html_safe end end def working(agent) if agent.disabled? link_to 'Disabled', agent_path(agent), :class => 'label label-warning' elsif agent.working? 'Yes'.html_safe else link_to 'No', agent_path(agent, :tab => (agent.recent_error_logs? ? 'logs' : 'details')), :class => 'label label-danger' end end end