title: undefined method `new' for nil:NilClass
body: <p>This question's name has been used but this question is completely different. In <strong>localhost:3000/forums/new</strong>, it says this:</p>
  
  <p><strong>undefined method `new' for nil:NilClass</strong></p>
  
  <p>my forums_controller.rb:</p>
  
  <pre><code> class ForumsController &lt; ApplicationController
       def index
       end
  
       def forum
       end
  
       def new
           @forum = forum.new
       end
  
       def create
           @forum = forum.new (forum_params)
       end
  
       private
  
       def forum_params
           params.require(:forum).permit(:title, :text)
       end
   end
  </code></pre>
  
  <p>my new.html.erb (under view>forums):</p>
  
  <pre><code> &lt;h1&gt;New Forum&lt;/h1&gt;
  
   = render 'forum'
  
   = link_to "Back", root_path
  </code></pre>
  
  <p>my index.html.erb under view>forums is completely empty.
  my application controller:</p>
  
  <pre><code> class ApplicationController &lt; ActionController::Base
     protect_from_forgery with: :exception
   end
  </code></pre>
  
  <p>_forum.html.erb:</p>
  
  <pre><code> = simple_form_for @forum, html: { multipart: true } do |f|
     - if @forum.errors.any?
       #errors
         %h2
         = pluralize(@forum.errors.count, "error")
         perevented this Forum for saving
         %ul
           - @forum.errors.full_messages.each do |msg|
             %li= msg
  
     .forum-group
       = f.input :title, input_html { class: 'forum-control' }
  
     .forum-group
       = f.input :text, input_html { class: 'forum-control' }
  
   = f.button :submit,class: "btn btn-primary"
  </code></pre>
  
  <p>Anyone know how to solve this?
  If there is any code missing, please comment and I will add it.</p>