So I'm cleaning up my views at the moment, and thought it'd be nice to create a couple of helpers, one that shows links if the user is logged in, and one that shows another set of links if they're not logged in.
Anyways, this is the code:
def logged_in_links if logged_in? link_to 'New Highlight', new_highlight_path link_to 'Logout?', logout_path link_to 'Profile »', @current_user.login end end
I'm sure I'm making a rudimentary mistake (take into account I am a beginner), but whenever I execute the helper method only the last link shows up, and if I remove the last link than it's the new last link that displays etc.
What am I doing wrong?