%# FIXME: nie trzeba ustawiac goal_id, data-remote samo wysle %> <%= goal_f.collection_select :id, @project.goals, :id, :name, {include_blank: false, required: true, label: :field_goal}, autocomplete: 'off', onchange: "$.ajax({ url: '#{goal_path(id: :goal_id)}' .replace('goal_id', $('#target_goal_attributes_id').val()), dataType: 'script' }); return false;" %> <%= link_to l(:button_add), '#', onclick: "$.ajax({ url: '#{edit_goal_path(id: :goal_id)}' .replace('goal_id', $('#target_goal_attributes_id').val()), dataType: 'script' }); return false;", class: 'icon icon-add' %> <% if goal_f.object.description? %>
<%= goal_f.object.description %>
<% end %>