anchor.diff:    .to_s%>", category_array: JSON.stringify(cat_done_array) },
                 success: function(data){    
                   $("#categories_viewer_modal").modal('toggle');
  -                alert("<%=t('category.success')%>");
  -                location.reload();
  -                }
  +
  +                  }
       });
     });
   
  
positive.code:         <% generic_categories = Category.authored_by(current_subject).sort_by!{|e| e.title.downcase} %>
          <p class= "information"><%= t("category.cat_add_title")%></p> 
          
  
          <% end %>
        </ul>
      </div>
  
       <!--<p class= "information"><%= t("category.cat_popular")%></p>-->
       <br>
       <div id="suggested_categories" class="tagBoxNew">
          <% rcCategories = generic_categories.reject{|e| get_initial_categories(item).include? e.id} %> 
          <%simple_gen = rcCategories.sort{|a,b| b.property_objects.length <=> a.property_objects.length}.first(7)%>
          <ul id="suggestedCategories" class="tagit">
          <% simple_gen.each do |init| %> 
            
              <li class="tagit-choice" value="<%= init.id %>" ><%=init.title%></li>
            
          <% end %>
          </ul>
       </div>
  
      <p class="information"><%= t("category.categorized_like")%></p>
      <%tagArray= generic_categories.map{|e| e.title}%>
      <script type="text/javascript">
      $(document).ready(function() {
          var tagList= [
            <%tagArray.each do |tags|%>
              "<%=tags%>",
            <%end%>
          ];
          $("#myCategories").tagit({
            watermarkAllowMessage: "<%= t('category.tagit_watermark_cat')%>",
            tagSource: tagList
          });
          //Get categorized by this author
          <% resource_categories = []
          get_initial_categories(item).each do |e|
          n = Category.find(e)
            if generic_categories.include? n
              resource_categories  += [n]
           end
          end
           %>
            <% resource_categories.each do |cat| %>
              <% ident = Category.find(cat) %>
              $("#myCategories").tagit("add", "<%=ident.title %>", "<%=ident.id%>");
          <%end%> 
          //Save suggested categories state
  
  
        </div>
        <div class="modal-footer">
  
negative.code: 
      $("#myCategories .tagit-choice").each(function(index,elem){
        //comprobar primero los que tengan un attrvalue null para crearlos
        if ($(elem).attr("tagvalue") != null){
          cat_done_array.push({id: $(elem).attr("tagvalue")});
        }
        else {
          cat_done_array.push({title: $(elem).text()});
        }
      });
  
      $.ajax({
  