I have this code in my user model
class User < ActiveRecord::Base
after_create :set_user_full_name
.........
private
def set_user_full_name
self.name = "Test name"
end
end
But when I create a user the name attribute is nil. I tried adding name to
create and update strong params but no luck.
devise_parameter_sanitizer.for(:sign_up) << [:name]
devise_parameter_sanitizer.for(:account_update) << [:name]
Any help would be appreciated!