mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-02 04:42:19 +08:00
Removed in 2022 because of perf considerations. This restores it and updates the implementation and styling. The perf should not be an issue anymore: 1. it's now rendered only in the crawler view (and not for regular logged-in users or anons) 2. it previously used Rails' partial rendering which re-read file on each request. `register_html_builder` is more efficient (and this particular block skips rendering completely when not applicable)
14 lines
439 B
Ruby
14 lines
439 B
Ruby
# frozen_string_literal: true
|
|
|
|
PostVoting::Engine.routes.draw do
|
|
resource :vote
|
|
get "voters" => "votes#voters"
|
|
|
|
get "comments" => "comments#load_more_comments"
|
|
post "comments" => "comments#create"
|
|
delete "comments" => "comments#destroy"
|
|
put "comments" => "comments#update"
|
|
put "comments/flag" => "comments#flag"
|
|
post "vote/comment" => "votes#create_comment_vote"
|
|
delete "vote/comment" => "votes#destroy_comment_vote"
|
|
end
|