<% if !resource.is_a?(Column) && (
	can?(:destroy, resource) || can?(:edit, resource) || (
      resource.respond_to?(:state_events) && resource.state_events.select{|event| can? event, resource }.any?
    )
) %>
<div class="dropdown">
  <a class="dropdown-toggle" data-toggle="dropdown" href="#"><%= t('general.actions') %></a>
  <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
  <% if can? :destroy, resource %>    
    <li>
      <%= link_to(
        t('general.destroy'), polymorphic_or_resource_path(resource), id: "#{resource.class.name.tableize.singularize}_#{resource.id}", method: :delete, 
        data: { confirm: t('general.questions.are_you_sure') },
        onclick: "delete_link('#{resource.class.name.tableize.singularize}_#{resource.id}'); return false;"
      ) 
      %>
    </li>
  <% end %>
  <% if can? :edit, resource %>    
    <li><%= link_to t('general.edit'), eval("edit_#{type.singularize}_path(resource)") %></li>
  <% end %>
  <% if resource.respond_to? :state_events %>
  <li class="divider"></li>
  <% end %>
  <%= render 'shared/resource/event_elements', resource: resource, type: type %>
  </ul>
</div>
<% end %>
<% if !resource.is_a?(Column) && (
	can?(:destroy, resource) || can?(:edit, resource) || (
      resource.respond_to?(:state_events) && resource.state_events.select{|event| can? event, resource }.any?
    )
) %>
<div class="dropdown">
  <a class="dropdown-toggle" data-toggle="dropdown" href="#"><%= t('general.actions') %></a>
  <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
  <% if can? :destroy, resource %>    
    <li>
      <%= link_to(
        t('general.destroy'), polymorphic_or_resource_path(resource), id: "#{resource.class.name.tableize.singularize}_#{resource.id}", method: :delete, 
        data: { confirm: t('general.questions.are_you_sure') },
        onclick: "delete_link('#{resource.class.name.tableize.singularize}_#{resource.id}'); return false;"
      ) 
      %>
    </li>
  <% end %>
  <% if can? :edit, resource %>    
    <li><%= link_to t('general.edit'), eval("edit_#{type.gsub('/', '_').singularize}_path(resource)") %></li>
  <% end %>
  <% if resource.respond_to? :state_events %>
  <li class="divider"></li>
  <% end %>
  <%= render 'shared/resource/event_elements', resource: resource, type: type %>
  </ul>
</div>
<% end %>
Make edit link work with namespaced models.
Make edit link work with namespaced models.
