profile updater
This commit is contained in:
@ -1,16 +1,25 @@
|
||||
module Admin
|
||||
class ProfileController < ApplicationController
|
||||
class ProfileController < AdminController
|
||||
def view
|
||||
end
|
||||
|
||||
def edit
|
||||
@user = current_admin
|
||||
end
|
||||
|
||||
def update
|
||||
redirect_to admin_profile_path
|
||||
@user = current_admin
|
||||
|
||||
if @user.update_attributes(user_params)
|
||||
redirect_to admin_profile_path,
|
||||
flash: { success: "Sucessfully updated profile" }
|
||||
else
|
||||
flash[:error] = "Failed to update profile."
|
||||
render :edit
|
||||
end
|
||||
end
|
||||
|
||||
def lost_password
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user