return
end
- @review.assignee = User.find params[:assignee_id]
+ assignee = User.find params[:assignee_id] unless params[:assignee_id].blank?
+ @review.assignee = assignee
@review.save
render :partial => 'reviews/view'
sanitize_violation(violation)
violation.build_review(:user_id => current_user.id)
- violation.review.assignee = User.find params[:assignee_id]
+ assignee = User.find params[:assignee_id] unless params[:assignee_id].blank?
+ violation.review.assignee = assignee
violation.review.save!
violation.save
<%= submit_to_remote "submit_btn", "Assign",
:url => { :action => 'assign' },
- :update => "review",
- :condition => "$('assignee_id').value != ''" -%>
+ :update => "review" -%>
<%= link_to_remote 'Cancel',
:url => { :action => 'show', :id => params[:review_id] },
<td class="val" colspan="3">
<%= qualifier_icon(@review.resource) -%>
<% if !review.on_project? %> <%= @review.project.long_name -%> <%= image_tag 'sep12.png' -%> <% end %>
- <%= link_to_resource(review.resource, review.resource.long_name, { :tab => :violations, :rule => "f-positive" } ) %>
+ <%= link_to_resource(review.resource, review.resource.long_name, { :tab => :violations, :rule => review.false_positive ? "f-positive" : "" } ) %>
</td>
</tr>
</table>
<%= submit_to_remote "submit_btn", "Assign",
:url => { :action => 'violation_assign' },
- :update => "vId" + params[:violation_id],
- :condition => "$('assignee_id').value != ''" -%>
+ :update => "vId" + params[:violation_id] -%>
<%= link_to_remote 'Cancel',
:url => { :action => 'display_violation', :id => params[:violation_id] },