title: How To Update User Profile to user authentication from scratch
body: <p>I have followed the revised Railscast for user authentication from scratch. </p>
  
  <p>I wanted to know how I can add in parts for user to modify profile as I have other fields that they need to enter after registering such as gender, ethnicity, career, about me, children, height, etc.</p>
  
  <p>Is there a tutorial that shows you how to do this or can someone help point me in the right direction? </p>
  
  <p>My project files can be viewed at <a href="https://github.com/pwz2k/date" rel="nofollow">https://github.com/pwz2k/date</a></p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I have started working on it, not sure if I am doing this right. I want the user to be able to modify their account settings (fields used when registering).</p>
  
  <p>Below is my edit.html in the /users folder.</p>
  
  <pre><code>&lt;h1&gt;Account Information&lt;/h1&gt;
  
  &lt;%= form_for @user do |f| %&gt;
    &lt;% if @user.errors.any? %&gt;
      &lt;div class="error_messages"&gt;
        &lt;h2&gt;Form is invalid&lt;/h2&gt;
        &lt;ul&gt;
          &lt;% @user.errors.full_messages.each do |message| %&gt;
            &lt;li&gt;&lt;%= message %&gt;&lt;/li&gt;
          &lt;% end %&gt;
        &lt;/ul&gt;
      &lt;/div&gt;
    &lt;% end %&gt;
  
      &lt;div class="field"&gt;
          &lt;%= f.label :email %&gt;&lt;br/&gt;
          &lt;%= f.text_field :email %&gt;
      &lt;/div&gt;
      &lt;div class="field"&gt;
          &lt;%= f.label :password %&gt;&lt;br/&gt;
          &lt;%= f.password_field :password %&gt;
      &lt;/div&gt;
      &lt;div class="field"&gt;
          &lt;%= f.label :password_confirmation %&gt;&lt;br/&gt;
          &lt;%= f.password_field :password_confirmation %&gt;
      &lt;/div&gt;
      &lt;div class="field"&gt;
          &lt;%= f.label :username %&gt;&lt;br/&gt;
          &lt;%= f.text_field :username %&gt;
      &lt;/div&gt;
      &lt;div class="field"&gt;
          &lt;%= f.label :zip_code %&gt;&lt;br/&gt;
          &lt;%= f.text_field :zip_code %&gt;
      &lt;/div&gt;
      &lt;div class="field"&gt;
          &lt;%= f.label :birthday %&gt;&lt;br/&gt;
          &lt;%= f.text_field :birthday %&gt;
      &lt;/div&gt;  
      &lt;div class="actions"&gt;&lt;%= f.submit %&gt;&lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>Here's my routes:</p>
  
  <pre><code>Dating::Application.routes.draw do
    get 'signup' =&gt; 'users#new'
    get 'login' =&gt; 'sessions#new'
    get 'logout' =&gt; 'sessions#destroy'
    get 'edit' =&gt; 'edit#edit'
  
    resources :users
    resources :sessions
    resources :password_resets
  
    root to: 'users#new'
  </code></pre>
  
  <p>And here is what I added to users_controller that I am not sure I did properly:</p>
  
  <pre><code>  def edit
        @user = User.find(params[:user])
    end
  
    def update
      @user = User.find(params[:user])
      if @user.update_attributes(params[:user])
        flash[:success] = "Account updated"
        sign_in @user
        redirect_to @user
      else
        render 'edit'
    end
  </code></pre>
  
  <p>How I will eventually have everything working is user will go to /edit to modify their account settings with all their private information that was filled our during registration. Then users can edit the profile information (gender, race, career, about me, etc) directly on their profile page (will use in-place editing). So I just need to know if the steps I have taken are correct (I haven't used the terminal yet) and  if so how do I get the edit page to display as it shows routing error atm.</p>