<% applications.each do |app, models| %> <% models.each do |model| %> <% klass = model.constantize klass_human_name = klass.model_name.human.gsub("/", " ").pluralize admin_items_path = { :controller => "admin/#{klass.to_resource}" } %> "> <% end %>
<%= _(app) %>
<%= link_to klass_human_name, admin_items_path %> <%= link_to_if @current_user.can?("create", klass), _("Add"), admin_items_path.merge(:action => "new") %>
<% end %>