title: How to display Devise account details on a profile page
body: <p>Using Devise I would like to display User account information such as profile name, first &amp; last name etc on another page called profile page within my rails application. </p>
  
  <p>I have created a controller called profiles with a view called profile/show
  In the controller have added the below code</p>
  
  <pre><code>def show
      @user = User.find_by_profile_name(params[:id])
      if @user
        render action: :show
      else
        render file: 'public/404', status: 404, formats: [:html]
          end
      end
  end
  </code></pre>
  
  <p>In the view profiles/show I have the following code </p>
  
  <pre><code>&lt;%= @user.profile_name %&gt;
  </code></pre>
  
  <p>and the route is get 'profiles/show'. </p>
  
  <p>My issue is when I do all of the above the profile name of the user still does not display on the profile page? There are no errors that come up it just doesn't display. I am not sure what code I am missing. I have checked the console and the user does have a profile name save to that ID and this is also in the devise account settings. So I am not sure how to get this information to display?</p>