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
improve review card on /reviews #384
Conversation
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.
Всё хорошо, но надо переделать
@@ -2,6 +2,6 @@ | |||
|
|||
class Web::ReviewsController < Web::ApplicationController | |||
def index | |||
@reviews = Review.published.with_locale.page(params[:page]) | |||
@reviews = Review.published.with_locale.page(params[:page]).order(created_at: :desc) |
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.
это не так работает
после page у тебя по прежнему объект запроса и можно добавлять условия и сортировки,а не результат
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.
но сортировки и всё такое разве будет работать ко всем даннным? а не только к тому, что в пагинацию попало?
- let link_to review.language, language_path(review.language.slug), class: 'text-body' do |link| | ||
.small.mb-2 = t('.course_html', link: link) | ||
.small.mb-2 | ||
= link_to t('.course_html', link: review.language), language_path(review.language.slug), class: 'text-body' |
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.
от тут какая-то херня получилась с переводом, почему это html?
и почему передающаяся переменная это link?
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.
Андрей, немного не понимаю замечания
link переименовать на name или languege, понятно
а с html что не так?
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.
А, поняла
1870606
to
922fcf1
Compare
8cfa85f
to
2e0a111
Compare
Изменила карточку отзыва: выводится дата публикации, слово "курс" входит в ссылку, добавила сортировку по дате публикации