Skip to content

Commit

Permalink
@courseを利用して@categoriesを取得するように修正
Browse files Browse the repository at this point in the history
  • Loading branch information
omochiumaiumai committed Apr 25, 2024
1 parent 69a0b2a commit 92fb52d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/courses/practices_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class Courses::PracticesController < ApplicationController
def index
@course = Course.find(params[:course_id])
@categories = Course.find(@course.id).categories.order(:created_at)
@categories = @course.categories.order(:created_at)
@learnings = current_user.learnings
end
end

0 comments on commit 92fb52d

Please sign in to comment.