Reputation: 53
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
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