Class: Integrator::UsersController
- Inherits:
-
CmsController
- Object
- ActionController::Base
- CmsController
- Integrator::UsersController
- Defined in:
- app/controllers/integrator/users_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
15 16 17 |
# File 'app/controllers/integrator/users_controller.rb', line 15 def create respond_with User.create(user_params), location: users_path end |
#destroy ⇒ Object
27 28 29 |
# File 'app/controllers/integrator/users_controller.rb', line 27 def destroy current_integrator_user == @user ? (redirect_to users_path) : (respond_with @user.destroy) end |
#edit ⇒ Object
19 20 |
# File 'app/controllers/integrator/users_controller.rb', line 19 def edit end |
#index ⇒ Object
7 8 9 10 |
# File 'app/controllers/integrator/users_controller.rb', line 7 def index @users = User.all respond_with @users end |
#new ⇒ Object
12 13 |
# File 'app/controllers/integrator/users_controller.rb', line 12 def new end |
#update ⇒ Object
22 23 24 25 |
# File 'app/controllers/integrator/users_controller.rb', line 22 def update @user.update(user_params) respond_with @user, location: users_path end |