I'm using typedstore with lockbox. When trying to assign the values in setting in a request it seems to work. Not getting any errors. But after going into the console and checking the value it doesn't seem to work, it's returning the default value.
ie.
User.last.language # => 'en-us'
# but
User.last.city # => ""
controller
def create
user = User.find_by(q2_id: q2_id_param)
if user.blank?
user = User.find_or_initialize_by(
email: q2_user_param[:email_address]
)
unless user.persisted?
user.password = generated_password
user.password_confirmation = generated_password
end
user.q2_id = q2_id_param
end
user.map_settings!(q2_user_param)
user.reload
render json: JSON.dump(
user: {
uuid: user.hp_user_uuid,
auth_token: user.authentication_token
}
)
end
I'm using typedstore with lockbox. When trying to assign the values in setting in a request it seems to work. Not getting any errors. But after going into the console and checking the value it doesn't seem to work, it's returning the default value.
ie.
controller
having_settings.rby
body of postman request