ruby on rails - Submit doesn't do anything -
ruby on rails - Submit doesn't do anything -
i'm using rails 4, bootstrap 3 , simple_form , reason "submit" button doesn't submit anything. it's not generating in server output me debug with.
here code:
<%= simple_form_for(@schedule) |f| %> <% if @schedule.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(@schedule.errors.count, "error") %> prohibited schedule beingness saved:</h2> <ul> <% @schedule.errors.full_messages.each |msg| %> <li><%= msg %></li> <% end %> </ul> </div> <% end %> <form class="form-inline" role="form"> <div class="form-group"> <%= f.input :rating, collection: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"] %> </br> <%= f.input :thought, :input_html => {:rows => 10, :cols => 85} %> </div> </form> <div class="actions"> <%= f.button :submit, "create", :class => 'btn btn-primary'%> </div> <% end %>
here model:
class schedule < activerecord::base validates :rating, :presence => true validates :thought, :presence => true end
i'm sure it's simple, i'm stumped.
thanks in advance.
delete
<form class="form-inline" role="form"> # <--- form begin <div class="form-group"> <%= f.input :rating, collection: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"] %> </br> <%= f.input :thought, :input_html => {:rows => 10, :cols => 85} %> </div> </form> # <--- form end
this code separate form in 2 different forms.
ruby-on-rails ruby twitter-bootstrap simple-form
Comments
Post a Comment