title: NoMethodError in Browse#index - undefined method for nil:NilClass
body: <p>I created a new controller called browse and this is what I have inside it</p>
  
  <pre><code>class BrowseController &lt; ApplicationController
  def index
      @hashtags = Hashtag.all
  end    
  end
  </code></pre>
  
  <p>I'm trying to display all of the hashtags in view using this (views\browse\index.html.erb)</p>
  
  <pre><code>&lt;ul&gt; 
  &lt;% @post.hashtags.each do |h| %&gt;
  
  &lt;li&gt;&lt;%= h.hashtags %&gt;&lt;/li&gt;
  &lt;% end %&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Here's the error that I'm getting</p>
  
  <pre><code>NoMethodError in Browse#index
  undefined method `hashtags' for nil:NilClass
  </code></pre>
  
  <p>My routes.rb</p>
  
  <pre><code>get'/browse' =&gt; 'browse#index', :as =&gt; :index
  </code></pre>
  
  <p>How can I fix this error to display the list in browse.html.erb?
  And if I wanted to display them in descending order of date, where do I need to put that?</p>