Class VotesController
In: app/controllers/votes_controller.rb
Parent: ApplicationController

Methods

create  

Public Instance methods

REST-methods

[Source]

    # File app/controllers/votes_controller.rb, line 27
27:   def create
28:     begin
29:       Rating.transaction do
30:         self.rating_and_new_vote
31:         @vote.score = params[:score].to_i
32:         @rating.vote(@vote)
33:       end
34:       @votes_count = @rating.votes.count
35:       @positive_votes = @rating.votes.positive[0..10]
36:     rescue RuntimeError => error
37:       flash.now[:error] = error.to_s
38:     end
39:   end

[Validate]