title: Ruby on Rails - Displaying a user names on a new page/controller
body: <p><strong>QUESTION: How can I have a new page, with a new controller, display information from my database?</strong></p>
  
  <p>So I am creating a page that will display a list of users and their names in a table.</p>
  
  <p>I created this new page using:</p>
  
  <pre><code>rails generate controller Information users
  </code></pre>
  
  <p>And created the appropriate routes. Now, on the html.erb of this page (users.html.erb):</p>
  
  <p>I have:</p>
  
  <pre><code>&lt;h1&gt;Information#users&lt;/h1&gt;
  &lt;p&gt;Find me in app/views/information/users.html.erb&lt;/p&gt;
  </code></pre>
  
  <p>I want to do something like this in the page:</p>
  
  <pre><code>&lt;%= @users.name %&gt;
  </code></pre>
  
  <p>To display the users name.</p>
  
  <p>My controller is:</p>
  
  <pre><code>class InformationController &lt; ApplicationController
    def users
      @current_user = current_user
    end
  end
  </code></pre>
  
  <p>And the users scheme database is:</p>
  
  <pre><code>  create_table "users", force: :cascade do |t|
      t.string   "email",                  default: "", null: false
      t.string   "encrypted_password",     default: "", null: false
      t.string   "phone_number"
      t.string   "name"
    end
  </code></pre>
  
  <p>So what should I be doing to have the users.html.erb page display users information on this page?</p>