Skip to content

Commit

Permalink
fix: sort order
Browse files Browse the repository at this point in the history
  • Loading branch information
takaokouji committed Sep 14, 2024
1 parent 7fdd4fa commit ed50763
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/quotes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class QuotesController < ApplicationController
before_action :set_quote, only: [ :show, :edit, :update, :destroy ]

def index
@quotes = Quote.all
@quotes = Quote.order(id: :desc)
end

def show
Expand Down
2 changes: 1 addition & 1 deletion test/system/quotes_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class QuotesTest < ApplicationSystemTestCase
setup do
@quote = quotes(:first)
@quote = Quote.last
end

test "Creating a new quote" do
Expand Down

0 comments on commit ed50763

Please sign in to comment.