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
日報の検索機能を追加 #130
日報の検索機能を追加 #130
Conversation
@@ -68,7 +68,12 @@ def report_params | |||
end | |||
|
|||
def set_reports | |||
@reports = Report.order(updated_at: :desc, id: :desc) | |||
if params.key?(:word) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set_reports
で@search_word
も代入してるとわかりにくいので別の名前にするか処理の分け方を別にしたほうがいいと思います。
da9bc9a
to
a8364ca
Compare
@@ -67,8 +68,16 @@ def report_params | |||
) | |||
end | |||
|
|||
def set_search_word | |||
@search_word = params[:word] | |||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
前回頂いたレビューから時間が経ってしまい、申し訳ありません。レビューの中で、処理の分け方を別にした方が良い
といったお話がありましたが、上記の修正で合っていますか?
それとも、app/models/search.rb
ファイルを作成し、model
内にLike検索の処理を記述し、app/controllers/reports_controller.rb
で処理を呼び出す方が良いということでしょうか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
上記であってます。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ありがとうございます!
@@ -67,8 +68,16 @@ def report_params | |||
) | |||
end | |||
|
|||
def set_search_word | |||
@search_word = params[:word] | |||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
上記であってます。
@machida 検索フォームのデザインについて、どのようにしたら良いかアドバイス頂きたいです。 |
a8364ca
to
233b492
Compare
@komagata レビューお願いします! |
@hattori6789 コンフリクトしてたので master をrebase しました。このブランチをいじるときは、ローカルのを一旦消してから、このブランチを取り込んで作業お願いします。 |
@machida ローカルのを一旦消してからというのは、ローカルの |
@hattori6789 はい、commit の順番を変えたので、これをpull するとエラーが出ると思います。 |
search_page のほうですー |
@machida かしこまりました!ありがとうございます! |
@machida デザインしていただいたものを手元で動かしてみました。デザインで綺麗にしてもらったものが動いているのを見ると、より嬉しい😆 |
@hattori6789 #129 こっちのブランチにも取り込みましたー |
@machida ありがとうございます!新デザインでも触ってみてます。 |
@hattori6789 今回は新デザインの前にmasterに取り込んでリリースしたいので、masterに取り込まれてからcloseでお願いしますー |
@machida かしこまりました! |
@komagata ありがとうございます😂 |
connected #123
Todo
日報検索
と表示<検索ワード> の検索結果
と表示