![](/img/trans.png)
[英]Can't create new record in Active Admin panel, Rails 4 and Devise
[英]how can we create partials in active admin for index panel
我想创建一个部分来为 DRY 的不同命名空间在索引面板中呈现一些数据
我目前正在写作
index do
render 'index', user: :user
end
//_index.html.arb
column :id
column 'Customer Name', :name
column :mobile
column :recipient_number
column :cash_in_hand do |customer|
number_to_currency(customer.cash_in_hand, unit: "\u20B9", precision: 2)
end
column "Due Balance" do |customer|
number_to_currency(customer.due_balance, unit: "\u20B9", precision: 2)
end
actions
我想创建一个部分来为 DRY 的不同命名空间在索引面板中呈现一些数据
我目前正在写作
index do
render 'index', user: :user
end
//_index.html.arb
column :id
column 'Customer Name', :name
column :mobile
column :recipient_number
column :cash_in_hand do |customer|
number_to_currency(customer.cash_in_hand, unit: "\u20B9", precision: 2)
end
column "Due Balance" do |customer|
number_to_currency(customer.due_balance, unit: "\u20B9", precision: 2)
end
actions
我想创建一个部分来为 DRY 的不同命名空间在索引面板中呈现一些数据
我目前正在写作
index do
render 'index', user: :user
end
//_index.html.arb
column :id
column 'Customer Name', :name
column :mobile
column :recipient_number
column :cash_in_hand do |customer|
number_to_currency(customer.cash_in_hand, unit: "\u20B9", precision: 2)
end
column "Due Balance" do |customer|
number_to_currency(customer.due_balance, unit: "\u20B9", precision: 2)
end
actions
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.