Estou criando um sistema de apontamentos com clientes, projetos, atividades, profissionais e apontamento, todas as partes passam e salvam corretamente, menos a parte do lançamento dos apontamentos.
Segue a imagem do erro ao tentar realizar o apontamento.
Segue o código do new.html.erb
<%= form_for (@timesheet), html:{ class: "form-horizontal" } do |f| %>
<!-- Alert Error -->
<%= error_messages_for @timesheet %>
<!-- Title -->
<div class="form-group">
<%= f.label :activity_id, "Atividade:", class: "control-label col-sm-2" %>
<div class="col-md-6 col-sm-9">
<%= collection_select(:timesheet, :activity_id, Activity.all, :object_id, :name) %>
</div>
</div>
<div class="form-group">
<%= f.label :professional, "Profissional:", class: "control-label col-sm-2" %>
<div class="col-md-6 col-sm-9">
<%= collection_select(:timesheet, :professional, Professional.all, :user_id, :name) %>
</div>
</div>
<div class="form-group">
<%= f.label :day, "Dia:", class: "control-label col-sm-2" %>
<div class="col-md-2 col-sm-9">
<%= f.text_field :initial_hour, :class => 'form-control date', placeholder: 'DD/MM/AAAA' %>
</div>
</div>
<div class="form-group">
<%= f.label :initial_hour, "Data/Hora Inicial:", class: "control-label col-sm-2" %>
<div class="col-md-6 col-sm-9">
<%= f.time_select :initial_hour, :class => 'form-control', :required => true %>
</div>
</div>
<div class="form-group">
<%= f.label :final_hour, "Data/Hora Final:", class: "control-label col-sm-2" %>
<div class="col-md-6 col-sm-9">
<%= f.time_select :final_hour, :class => 'form-control', :required => true %>
</div>
</div>
<div class="form-group">
<%= f.label :quantity_hours, "Quantidade de horas:", class: "control-label col-sm-2" %>
<div class="col-md-2 col-sm-9">
<%= f.text_field :quantity_hours, :class => 'form-control', :required => true %>
</div>
</div>
<div class="form-group">
<%= f.label :situation, "Situação:", class: "control-label col-sm-2" %>
<div class="col-md-6 col-sm-9">
<%= f.select :status, Timesheet.status.options %>
</div>
</div>
<div class="form-group">
<%= f.label :remunerated, "Remunerado:", class: "control-label col-sm-2" %>
<div class="col-md-6 col-sm-9">
<%= f.check_box :remunerated, :class => 'form-control', :required => true %>
</div>
</div>
<div class="form-group">
<%= f.label :billed, "Faturado:", class: "control-label col-sm-2" %>
<div class="col-md-6 col-sm-9">
<%= f.check_box :billed, :class => 'form-control', :required => true %>
</div>
</div>
<div class="form-group">
<%= f.label :displacement, "Deslocamento:", class: "control-label col-sm-2" %>
<div class="col-md-6 col-sm-9">
<%= f.check_box :displacement, :class => 'form-control', :required => true %>
</div>
</div>
<div class="hr-line-dashed"></div>
<!-- Buttons -->
<div class="form-group">
<div class="col-sm-4 col-sm-offset-2">
<%= link_to "Cancelar", timesheets_path, :class => 'btn btn-white' %>
<%= f.submit "Salvar", :class => 'btn btn-primary' %>
</div>
</div>
<% end %>
PS: Sou novo no rails e estou meio perdido. PS²: Estou usando enumerize para definir os options nos status.