I've got a rails update form like this:
<%= debug @ballot.scores %>
<%= simple_form_for(@ballot, :url => "/vote/#{@election.id}/ballot/#{@ballot.position}/submit", :method => :post, :html => {:class => 'form-horizontal' }) do |f| %>
<% f.fields_for :scores do |builder| %>
<div class="slider">Slider goes here!</div>
<%= builder.hidden_field :initialValue, :value => 50 %>
<% end %>
<%= f.button :submit %>
<% end %>
The debug shows:
---
- !ruby/object:Score
attributes:
id: 1
ballot_id: 4
candidate_id: 4
initialScore:
normalizedScore:
created_at: 2013-08-08 05:00:10.391163000 Z
updated_at: 2013-08-08 05:00:10.432374000 Z
- !ruby/object:Score
attributes:
id: 2
ballot_id: 4
candidate_id: 5
initialScore:
normalizedScore:
created_at: 2013-08-08 05:00:10.418904000 Z
updated_at: 2013-08-08 05:00:10.434772000 Z
So there are definitely score objects, however no "Slider goes here!" text is showing up on the page. Why isn't this working?
Let me know if you need more info :)