Class: RolesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- RolesController
- Defined in:
- app/controllers/roles_controller.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
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 |
#update ⇒ Object
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 |