Skip to content

Commit

Permalink
Merge branch 'master' into rails-7
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanfb committed Dec 3, 2024
2 parents 93bc272 + 58ff0f0 commit 2e59f81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def self.stats(user_id)
stats = ActiveRecord::Base.connection.execute("select p.id AS pub_id, p.title AS pub_title, p.status AS pub_status, i.title AS id_title, c.comment AS comment, c.reason AS reason, c.created_at AS created_at from comments c LEFT OUTER JOIN publications p ON c.publication_id=p.id LEFT OUTER JOIN identifiers i ON c.identifier_id=i.id where c.user_id=#{user_id} ORDER BY c.created_at;")
stats.each do |row|
row['created_at'] = DateTime.parse(row['created_at'].to_s)
row['comment'] = URI.unescape(row['comment']).tr('+', ' ') unless row['comment'].nil?
row['comment'] = URI::DEFAULT_PARSER.unescape(row['comment']).tr('+', ' ') unless row['comment'].nil?
end
end
end
Expand Down

0 comments on commit 2e59f81

Please sign in to comment.