Class: RolesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/roles_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



14
15
16
17
18
# File 'app/controllers/roles_controller.rb', line 14

def destroy
	@user.roles.delete @role
	flash[:notice] = 'User was successfully updated.'
	redirect_to @user
end

#updateObject



8
9
10
11
12
# File 'app/controllers/roles_controller.rb', line 8

def update
	@user.roles << @role
	flash[:notice] = 'User was successfully updated.'
	redirect_to @user
end