khagimoto wrote:
Is it possible that you have another form field (hidden) with the same
name defined later on in the form?
New Service Availability
<% form_for(@service_availability) do |f| %>
<%= f.error_messages %>
<%= f.hidden_field :ServiceProviderID, :value => 1 %>
<%= f.label :Service %>
<%= f.collection_select :ServiceID, ServiceProviderService.all, :ID,
:Name, :include_blank => 'None' %>
<%= f.label :Monday %><%= f.check_box :Monday, {}, "1", "0" %><%=
f.label :Tuesday %><%= f.check_box :Tuesday, {}, "1", "0" %><%= f.label
:Wednesday %><%= f.check_box :Wednesday, {}, "1", "0" %><%= f.label
:Thursday %><%= f.check_box :Thursday, {}, "1", "0" %><%= f.label
:Friday %><%= f.check_box :Friday, {}, "1", "0" %><%= f.label :Saturday
%><%= f.check_box :Saturday, {}, "1", "0" %><%= f.label :Sunday %><%=
f.check_box :Sunday, {}, "1", "0" %>
<%= f.label :TimeStart %>
<%= f.text_field :TimeStart %>
<%= time_select(:TimeStart, "sunrise") %>
<%= f.label :TimeFinish %>
<%= f.text_field :TimeFinish %>
<%= time_select(:TimeFinish, "sunrise") %>
<%= f.submit 'Create' %>
<% end %>
<%= link_to ‘Back’, service_availabilities_path %> <%= link_to ‘Service
Providers’, service_providers_path %>