templates/admin/users.rb in prologue-0.1.1 vs templates/admin/users.rb in prologue-0.1.2
- old
+ new
@@ -32,9 +32,12 @@
FILE
end
inject_into_file 'app/controllers/admin/users_controller.rb', :after => "def update\n" do
<<-'FILE'
+ params[:user].delete(:password) if params[:user][:password].blank?
+ params[:user].delete(:password_confirmation) if params[:user][:password].blank? and params[:user][:password_confirmation].blank?
+
if @user.update_attributes(params[:user])
flash[:notice] = "Successfully updated #{@user.name}."
redirect_to admin_users_url
else
render :action => 'edit'