ensl.org/app/controllers/votes_controller.rb
Ari Timonen e59e8ac8e7 Lots of rails 4 updates
- Add .params to models and update controllers
- Add afk time to gather
- Reannotate models
- Fix rspec problem by using latest rspec plugins from github
2020-03-18 05:38:17 +02:00

13 lines
284 B
Ruby

class VotesController < ApplicationController
def create
@vote = Vote.new(Vote.params(params, cuser))
@vote.user = cuser
raise AccessError unless @vote.can_create? cuser
if @vote.save
flash[:notice] = t(:votes_success)
end
redirect_to_back
end
end