【发布时间】:2015-05-31 22:44:33
【问题描述】:
我在 Rails 4 和 ActiveAdmin 上使用批处理操作收集表单,用于在用户执行批处理操作(在本例中为批处理邮件程序)时捕获用户的输入。有没有办法自定义输入的标签?
比如说:
batch_action :email, priority: 1 , form: {main_subject: :text,
message: :textarea
} do |ids, inputs|
batch_action_collection.find(ids).each do |user|
ContactBatchMailer.contact_batch_email(main_subject, message,...
Instead of having "main_subject", I would like to display a better formatted text, like "Main Subject", or even better, something more descriptive than the variable name by itself.
我在文档https://github.com/activeadmin/activeadmin/blob/master/docs/9-batch-actions.md#batch-action-forms 中进行了挖掘,但我无法做到。 任何建议将不胜感激。
【问题讨论】:
标签: ruby-on-rails forms activeadmin batch-processing labels