24 lines
616 B
Plaintext
24 lines
616 B
Plaintext
<% if logged_in? %>
|
|
<p>Logged in as <%= current_user.username %></p>
|
|
<p><%= link_to "Log out", logout_path, data: {
|
|
turbo_method: :delete
|
|
} %></p>
|
|
<% else %>
|
|
<p><%= link_to "Log in", login_path %> or <%= link_to "Sign up", signup_path %></p>
|
|
<% end %>
|
|
|
|
<h1>Articles!</h1>
|
|
|
|
Our blog has <%= Article.public_count %> articles and counting!
|
|
|
|
<ul>
|
|
<% @articles.each do |article| %>
|
|
<% unless article.archived? %>
|
|
<li>
|
|
<%= link_to article.title, article %>
|
|
</li>
|
|
<%end%>
|
|
<% end %>
|
|
</ul>
|
|
|
|
<%= link_to "New Article", new_article_path %> |