Implement forum topic voting and tag change pruning (#3580)

This commit is contained in:
Albert Yi
2018-04-16 16:09:39 -07:00
parent 45fad069d7
commit f2b525a6d2
182 changed files with 558 additions and 554 deletions

View File

@@ -1,3 +1,5 @@
# Be sure to restart your server when you modify this file.
# Specify a serializer for the signed and encrypted cookie jars.
# Valid options are :json, :marshal, and :hybrid.
Rails.application.config.action_dispatch.cookies_serializer = :json

View File

@@ -0,0 +1,16 @@
# Be sure to restart your server when you modify this file.
# Avoid CORS issues when API is called from the frontend app.
# Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin AJAX requests.
# Read more: https://github.com/cyu/rack-cors
# Rails.application.config.middleware.insert_before 0, Rack::Cors do
# allow do
# origins 'example.com'
#
# resource '*',
# headers: :any,
# methods: [:get, :post, :put, :patch, :delete, :options, :head]
# end
# end

View File

@@ -5,6 +5,8 @@ en:
hello: "Hello world"
activerecord:
attributes:
forum_post_vote:
creator_id: "Your vote"
post:
approver: "You"
approver_id: "You"

View File

@@ -132,6 +132,7 @@ Rails.application.routes.draw do
resource :order, :only => [:edit], :controller => "favorite_group_orders"
end
resources :forum_posts do
resource :votes, controller: "forum_post_votes"
member do
post :undelete
end