Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quotes_controllerでActiveRecordを活用できそうな箇所の修正 #189

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

siroemk
Copy link
Owner

@siroemk siroemk commented Nov 15, 2023

Issue

概要

コードレビューで以下のようにアドバイスをいただいた。

.where(quote_id: params[:id])

ここは @quote.comments.includes(:user).order(created_at: :asc) と書けますね

モデルの関連を使った書き方に修正しました。

@siroemk siroemk merged commit e201d03 into main Nov 15, 2023
2 checks passed
@siroemk siroemk deleted the code-review-quotes-controller branch November 15, 2023 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant