BenMusch/nu-tab

View on GitHub
app/helpers/application_helper.rb

Summary

Maintainability
A
0 mins
Test Coverage
Missing magic comment `# frozen_string_literal: true`.
module ApplicationHelper
def title
if @title
"#{@title} - NU Tab"
else
'NU Tab'
end
end
 
def body_class
'app'
end
 
def link_or_none(model, method: :name)
model ? link_to(model.send(method), model) : 'None'
end
end