Class: Integrator::UsersController

Inherits:
CmsController
  • Object
show all
Defined in:
app/controllers/integrator/users_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



15
16
17
# File 'app/controllers/integrator/users_controller.rb', line 15

def create
  respond_with User.create(user_params), location: users_path
end

#destroyObject



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

#editObject



19
20
# File 'app/controllers/integrator/users_controller.rb', line 19

def edit
end

#indexObject



7
8
9
10
# File 'app/controllers/integrator/users_controller.rb', line 7

def index
  @users = User.all
  respond_with @users
end

#newObject



12
13
# File 'app/controllers/integrator/users_controller.rb', line 12

def new
end

#updateObject



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