mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-05-30 16:30:59 +00:00
Purged git history and removed sensitive information.
This commit is contained in:
commit
8ed526716f
857 changed files with 25312 additions and 0 deletions
13
app/controllers/votes_controller.rb
Normal file
13
app/controllers/votes_controller.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
class VotesController < ApplicationController
|
||||
def create
|
||||
@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
|
Loading…
Add table
Add a link
Reference in a new issue