Removed ordering of co-authors by id (#20162)

* Removed ordering of co-authors by id

* Updated logic

* Revert code

* Update app/decorators/article_decorator.rb

Co-authored-by: PJ <pj@forem.com>

---------

Co-authored-by: PJ <pj@forem.com>
This commit is contained in:
Rajat Talesra 2023-09-26 23:51:33 +05:30 committed by GitHub
parent 1d4bcf5ca8
commit b707712d73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,7 +102,7 @@ class ArticleDecorator < ApplicationDecorator
end
def co_author_name_and_path
co_authors.map do |user|
User.select(:name, :username).where(id: co_author_ids).in_order_of(:id, co_author_ids).map do |user|
%(<a href="#{user.path}" class="crayons-link">#{user.name}</a>)
end.to_sentence
end