app/controllers/phcmembers/member/profiles_controller.rb in phcmembers-18.0.0 vs app/controllers/phcmembers/member/profiles_controller.rb in phcmembers-19.0.0

- old
+ new

@@ -29,18 +29,20 @@ end # POST - Member Profile def create @member_profile = Member::Profile.new(member_profile_params) + @member_profile.user_name = current_user.username if @member_profile.save redirect_to member_profiles_url, notice: 'Profile was successfully created.' else render :new end end # PATCH/PUT - Member Profile def update + @member_profile.user_name = current_user.username if @member_profile.update(member_profile_params) redirect_to member_profiles_url, notice: 'Profile was successfully updated.' else render :edit end