Implement Event Ratings
This commit is contained in:
parent
5be1ad52ee
commit
20f4853487
67 changed files with 1298 additions and 378 deletions
12
app/controllers/rater_controller.rb
Normal file
12
app/controllers/rater_controller.rb
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
class RaterController < ApplicationController
|
||||
def create
|
||||
if user_signed_in?
|
||||
obj = params[:klass].classify.constantize.find(params[:id])
|
||||
obj.rate params[:score].to_f, current_user, params[:dimension]
|
||||
|
||||
render json: true
|
||||
else
|
||||
render json: false
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue