1
0

Changed params [:goal][:id] -> [:goal_id]

This commit is contained in:
cryptogopher 2020-08-24 22:09:52 +02:00
parent c2055c4eb4
commit 8d4e5215b3

View File

@ -1,8 +1,7 @@
<%= fields_for 'goal', goal do |ff| %>
<label for="goal_id"><%= l(:field_goal) %><span class="required"> *</span></label>
<%= ff.select :id,
options_from_collection_for_select(@project.goals, :id, :name, goal.id),
{required: true}, autocomplete: 'off',
<%= select_tag :goal_id,
options_from_collection_for_select(@project.goals, :id, :name, @goal.id),
required: true, autocomplete: 'off',
onchange: "var goal_id = $('#target_goal_attributes_id').val();
$.ajax({
url: '#{goal_path(id: :goal_id)}'.replace('goal_id', goal_id),
@ -17,7 +16,6 @@
});
return false;",
class: 'icon icon-add' %>
<% end %>
<% if goal.description? %>
<p style='white-space: pre-wrap;' ><%= goal.description %></p>
<% if @goal.description? %>
<p style='white-space: pre-wrap;' ><%= @goal.description %></p>
<% end %>