At the end of my blog posts I have links to previous and next articles. However, when you get to the last article, next_article returns nil. I’d like to link to the first article (the newest). Is this possible or do I need to write a helper?
I solved this by using blog.articles[0].url.
I think you can also do blog.articles.first.url
Just tested and it works. Thanks Craig, that’s what I was looking for.