Class: RaterController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- RaterController
- Defined in:
- lib/generators/letsrate/templates/rater_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/generators/letsrate/templates/rater_controller.rb', line 3 def create if user_signed_in? obj = params[:klass].classify.constantize.find(params[:id]) obj.rate params[:score].to_i, current_user, params[:dimension] render :json => true else render :json => false end end |