0
0
Fork 0
mirror of https://github.com/ENSL/ensl.org.git synced 2025-01-27 03:30:54 +00:00
ensl.org/app/controllers/votes_controller.rb

14 lines
271 B
Ruby
Raw Normal View History

class VotesController < ApplicationController
def create
2014-03-31 21:33:16 +00:00
@vote = Vote.new(params[:vote])
@vote.user = cuser
raise AccessError unless @vote.can_create? cuser
if @vote.save
flash[:notice] = t(:votes_success)
end
redirect_to_back
end
end