I am pretty sure it's a very noob mistake, but I don't understand why I can't add my form directly to my homepage without causing a NoMethodError. 

This is my current setup, and it works perfectly fine. 

view/front\_pages/home.html.erb (my home page)

```
<!--declare :title to be SHOULD I GET THIS-->
<% provide(:title, "SHOULD I GET THIS") %>
<div class = "container">
    <h1>Should I really spend money on this?</h1>
    <h2>Let's crunch in some numbers and find out...</h2>
    <%= link_to "Get Started", calculate_path, class: "btn btn-info " %>
</div>

```

view/users/new.html.erb (where my form is right now)

```
<% provide(:title, "Calculate")%>
<div class = "form-group container">
    <%= simple_form_for @user do |form|%>
        <%= form.error_notification%>
        <%= form.input :price%>
        <%= form.input :wallet%>
        <%= form.button :submit, "Submit", class: "submit"%>
    <%end%>
</div>

```

controllers/users\_controller.rb

```
class UsersController < ApplicationController
    def new
        @user = User.new
    end

end

```

However, I want the form to be directly on my home page so the users don't need to click an extra button to get to the form. I tried

view/front\_pages/home.html.erb

```
<!--declare :title to be SHOULD I GET THIS-->
<% provide(:title, "SHOULD I GET THIS") %>
<div class = "container">
    <h1>Should I really spend money on this?</h1>
    <h2>Let's crunch in some numbers and find out...</h2>
    <%= link_to "Get Started", calculate_path, class: "btn btn-info " %>
</div>
<div class = "form-group container">
    <%= simple_form_for @user do |form|%>
        <%= form.error_notification%>
        <%= form.input :price%>
        <%= form.input :wallet%>
        <%= form.button :submit, "Submit", class: "submit"%>
    <%end%>
</div>

```

and it returns me the NoMethodError. I thought it's because I did not initiate a @user variable in the front\_page controller, so I tried 

```
class FrontPagesController < ApplicationController
        def new
            @user = User.new
        end
    def home
    end
end

```

but it still does not work. I am thinking it's some concept about MVC that I still am not quite grasping. What is wrong with my code and what should I keep in mind next time so I don't make the same mistake? 

PS: I use simple\_form gem to generate my form

Edit: The error message is **undefined method `model\_name' for NilClass:Class**