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
6bcc8dc76b
862 changed files with 25312 additions and 0 deletions
15
app/controllers/predictions_controller.rb
Normal file
15
app/controllers/predictions_controller.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
class PredictionsController < ApplicationController
|
||||
def create
|
||||
@prediction = Prediction.new params[:prediction]
|
||||
@prediction.user = cuser
|
||||
raise AccessError unless @prediction.can_create? cuser
|
||||
|
||||
if @prediction.save
|
||||
flash[:notice] = t(:predictions_create)
|
||||
else
|
||||
flash[:error] = @prediction.errors.full_messages.to_s
|
||||
end
|
||||
|
||||
redirect_to @prediction.match
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue