Adding additional fields -devise and strong parameters

I am looking at adding some additional fields to my form much like you have when you add the name field to the users in the etsy project. If i want to add multiple extra fields how do you lay this out in the application controller? For example i tried the following but got errors? devise_parameter_sanitizer.for(:account_update) << :name, :line1, :line2

Posted almost 6 years ago by Emma
Posted almost 6 years ago by Emma

I changed it to the following and it worked

def configure_permitted_parameters
devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(:name) }
devise_parameter_sanitizer.for(:account_update) { |u| u.permit(:name, :line1, :line2, :town, :county, :postcode)}