skill-assessment-app/app/controllers/admin/profile_controller.rb
2016-08-24 12:53:21 -05:00

26 lines
474 B
Ruby

module Admin
class ProfileController < AdminController
def view
end
def edit
@user = current_admin
end
def update
@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