We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e731074 commit be30adbCopy full SHA for be30adb
app/controllers/voting_controller.rb
@@ -1,18 +1,18 @@
1
class VotingController < ApplicationController
2
def vote
3
if !user_signed_in? || current_user.votes.where(votable_id: nil).count < 1
4
- redirect_to :back
+ redirect_to community_voting_path
5
return
6
end
7
8
votable = Votable.find(params[:id])
9
if votable.nil?
10
11
12
13
14
vote_to_cast = current_user.votes.where(votable_id: nil).first
15
vote_to_cast.update votable_id: votable.id
16
- redirect_to :back, notice: "You voted for #{votable.name} successfully!"
+ redirect_to community_voting_path, notice: "You voted for #{votable.name} successfully!"
17
18
0 commit comments