Changed params [:goal][:id] -> [:goal_id]
This commit is contained in:
		
							parent
							
								
									c2055c4eb4
								
							
						
					
					
						commit
						8d4e5215b3
					
				@ -1,15 +1,14 @@
 | 
				
			|||||||
<%= fields_for 'goal', goal do |ff| %>
 | 
					<label for="goal_id"><%= l(:field_goal) %><span class="required"> *</span></label>
 | 
				
			||||||
  <label for="goal_id"><%= l(:field_goal) %><span class="required"> *</span></label>
 | 
					<%= select_tag :goal_id,
 | 
				
			||||||
  <%= ff.select :id,
 | 
					  options_from_collection_for_select(@project.goals, :id, :name, @goal.id),
 | 
				
			||||||
    options_from_collection_for_select(@project.goals, :id, :name, goal.id),
 | 
					  required: true, autocomplete: 'off',
 | 
				
			||||||
    {required: true}, autocomplete: 'off',
 | 
					 | 
				
			||||||
  onchange: "var goal_id = $('#target_goal_attributes_id').val();
 | 
					  onchange: "var goal_id = $('#target_goal_attributes_id').val();
 | 
				
			||||||
             $.ajax({
 | 
					             $.ajax({
 | 
				
			||||||
               url: '#{goal_path(id: :goal_id)}'.replace('goal_id', goal_id),
 | 
					               url: '#{goal_path(id: :goal_id)}'.replace('goal_id', goal_id),
 | 
				
			||||||
               dataType: 'script'
 | 
					               dataType: 'script'
 | 
				
			||||||
             });
 | 
					             });
 | 
				
			||||||
             return false;" %>
 | 
					             return false;" %>
 | 
				
			||||||
  <%= link_to l(:button_add), '#',
 | 
					<%= link_to l(:button_add), '#',
 | 
				
			||||||
  onclick: "var goal_id = $('#target_goal_attributes_id').val();
 | 
					  onclick: "var goal_id = $('#target_goal_attributes_id').val();
 | 
				
			||||||
            $.ajax({
 | 
					            $.ajax({
 | 
				
			||||||
              url: '#{edit_goal_path(id: :goal_id)}'.replace('goal_id', goal_id),
 | 
					              url: '#{edit_goal_path(id: :goal_id)}'.replace('goal_id', goal_id),
 | 
				
			||||||
@ -17,7 +16,6 @@
 | 
				
			|||||||
            });
 | 
					            });
 | 
				
			||||||
            return false;",
 | 
					            return false;",
 | 
				
			||||||
  class: 'icon icon-add' %>
 | 
					  class: 'icon icon-add' %>
 | 
				
			||||||
<% end %>
 | 
					<% if @goal.description? %>
 | 
				
			||||||
<% if goal.description? %>
 | 
					  <p style='white-space: pre-wrap;' ><%= @goal.description %></p>
 | 
				
			||||||
  <p style='white-space: pre-wrap;' ><%= goal.description %></p>
 | 
					 | 
				
			||||||
<% end %>
 | 
					<% end %>
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user