Skip to content

Commit

Permalink
Show Articles index
Browse files Browse the repository at this point in the history
  • Loading branch information
zainfathoni committed Oct 5, 2024
1 parent 75c0c25 commit 5fac9fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/controllers/reports_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class ReportsController < ApplicationController
def index
@articles = Article.all
end
end
10 changes: 9 additions & 1 deletion app/views/reports/index.html.erb
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
<h1>Hello, Rails!</h1>
<h1>Articles</h1>

<ul>
<% @articles.each do |article| %>
<li>
<%= article.title %>
</li>
<% end %>
</ul>

0 comments on commit 5fac9fd

Please sign in to comment.