//location.reload();
<% if params[:detail_page] %>
    window.location.href = '<%= organization_path(params[:organization_id],:org_subfield_id => @org_sub_id )%>';
<% else %>
    window.location.reload();
<% end %>