app/controllers/chaltron/users_controller.rb in chaltron-1.1.6 vs app/controllers/chaltron/users_controller.rb in chaltron-1.1.7
- old
+ new
@@ -41,9 +41,19 @@
def update
flash[:notice] = I18n.t('chaltron.users.updated') if @user.update(update_params)
respond_with(@user)
end
+ def enable
+ @user.enable!
+ redirect_to(@user)
+ end
+
+ def disable
+ @user.disable!
+ redirect_to(@user)
+ end
+
def self_update
user_params_with_pass = self_update_params.dup.to_h
if params[:user][:password].present?
user_params_with_pass.merge!(
password: params[:user][:password],