why it does not display the correct object?

Here is the partial:

    = company.name
    - unless company.reports.nil?
      = link_to image_tag("alert.png"), "#company_reports", :class => "reports"
    - company.categories.each do |category|
      = link_to category.name, category_path(category)
      - unless category == company.categories.last
  %td= link_to t('Show'), company
  %td= link_to t('Edit'), edit_company_path(company)
  %td= link_to t('Destroy'), company, :confirm => 'are_you_sure',
:method => :delete

%div(style="display: none;")
    = company.name

When I click in the link with image "alert.png" is displayed the name
of another company but not the current company.

Presumably you've got some JavaScript that shows divs in response to
these clicks. All of these divs have the same id, so the browser isn't
going to know which one to show