In my view part, I have shown the current logged in user details with the phoenix inbuilt variable which stores current logged in user details. I have used code like as shown below
<%= @current_user.email %> or <%= @current_user.name %> or <%= @current_user.profile_image %>
I have created a page where user can update his name or email or profile picture. But after update user details
if user moves to another page where I have called the
<%= @current_user.name %>
The above code showing the old data not the updated data, I have checked my database and the values are going into the DB correctly so why the current user not showing the updated details and how can I fix this issue.
I have tried to pull the user details by running the ECTO.query select and getting correct record but what should I do assing the updates made by user to the phoenx inbuilt varialble current_user.