0

我在 activeadmin 仪表板中。我试图只显示 current_user 的客户,但我得到一个错误undefined local variable or methodcurrent_user'`

这是我的仪表板代码:

section "Recent Customers" do
table_for Customer.owned_by(current_user).limit(5) do
  column "Name" do |customer| 
    link_to customer.name, admin_customers_path(customer)
  end
  column :phone
  column :email, :sortable => :email do |customer|
    link_to customer.email, "mailto:#{customer.email}"
  end
end
strong { link_to "View All Customers", admin_customers_path }
end
4

1 回答 1

0

在 active_admin 中尝试current_admin_user

于 2013-07-26T13:57:01.420 回答