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 に答える