update users info via ajax is working, yay. Next thing is we need to move the datatables into an ajax call and so that we can refresh the table upon any changes occuring
This commit is contained in:
@@ -22,11 +22,11 @@ class UsersController < ApplicationController
|
||||
end
|
||||
|
||||
def update
|
||||
current_user.update_attributes(params[:user].reject { |k| k == "password" })
|
||||
current_user.update_attributes(params[:user].reject { |k| k == ("password" || "password_confirmation") })
|
||||
pass = params[:user][:password]
|
||||
current_user.password = pass if !(pass.blank?)
|
||||
current_user.save!
|
||||
redirect_to user_account_settings_path(:user_id => current_user.id)
|
||||
redirect_to user_account_settings_path(:user_id => current_user.id)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user