]> git.openstreetmap.org Git - rails.git/blob - app/controllers/profiles/links_controller.rb
Merge pull request #5932 from tomhughes/frozen-strings
[rails.git] / app / controllers / profiles / links_controller.rb
1 # frozen_string_literal: true
2
3 module Profiles
4   class LinksController < ProfileSectionsController
5     private
6
7     def update_profile
8       social_links_params = params.permit(:user => [:social_links_attributes => [:id, :url, :_destroy]])
9       current_user.assign_attributes(social_links_params[:user])
10
11       current_user.save
12     end
13   end
14 end