Vincent Wittek
Vincent Wittek

Reputation: 53

My rails simple form is not responding correctly

I have a little bit of a problem with a website, I have an index page, which is designed to have posts which people can rate with a slider. Problem right now is that rails is not recognizing what I want to do wiht this error code enter image description here

Here is what my form looks like

    <%= simple_form_for [@post, @rating ] do |f| %>
        <%= f.input :rating, as: :range, min: 1, max: 100 %>
        <%= f.submit "Submittt"%>
    <% end %>

I have added the "@rating = Rating.new" line in my posts controller, and have also nested my "resources :ratings" inside my "resources :posts" Even in my RatingController - create section I have added the line "@rating = rating.new(params)" Can you tell me what is wrong? Thank you very much!

Upvotes: 0

Views: 42

Answers (0)

Related Questions