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
35
app/controllers/forumers_controller.rb
Normal file
35
app/controllers/forumers_controller.rb
Normal file
|
@ -0,0 +1,35 @@
|
|||
class ForumersController < ApplicationController
|
||||
def create
|
||||
@forumer = Forumer.new params[:forumer]
|
||||
raise AccessError unless @forumer.can_create? cuser
|
||||
|
||||
if @forumer.save
|
||||
flash[:notice] = t(:groups_added)
|
||||
else
|
||||
flash[:error] = @forumer.errors.full_messages.to_s
|
||||
end
|
||||
|
||||
redirect_to_back
|
||||
end
|
||||
|
||||
def update
|
||||
@forumer = Forumer.find params[:id]
|
||||
raise AccessError unless @forumer.can_update? cuser
|
||||
|
||||
if @forumer.update_attributes params[:forumer]
|
||||
flash[:notice] = t(:groups_acl_update)
|
||||
else
|
||||
flash[:error] = @forumer.errors.full_messages.to_s
|
||||
end
|
||||
|
||||
redirect_to_back
|
||||
end
|
||||
|
||||
def destroy
|
||||
@forumer = Forumer.find params[:id]
|
||||
raise AccessError unless @forumer.can_destroy? cuser
|
||||
|
||||
@forumer.destroy
|
||||
redirect_to_back
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue