2017-07-29 1 views
1

Nach activeamdin Dokument, was wir tun können:Gibt es eine Möglichkeit Formtastic in Activeadmin Batch Action Form zu verwenden?

batch_action :flag, form: { 
type: %w[Offensive Spam Other], 
    reason: :text, 
    notes: :textarea, 
    hide: :checkbox, 
    date: :datepicker 
} do |ids, inputs| 
    # inputs is a hash of all the form fields you requested 
    redirect_to collection_path, notice: [ids, inputs].to_s 
end 

jedoch die obige Form nicht formtastic und nicht die erweiterte Tabellenkonfiguration nicht unterstützt (legen Sie die Größe für das Formular Fenster). Gibt es eine Möglichkeit, dass ich es in Formtastic-Format wie ändern kann:

form do |f| 
    f.semantic_errors # shows errors on :base 
    f.inputs   # builds an input field for every attribute 
    f.actions   # adds the 'Submit' and 'Cancel' buttons 
end 

Antwort

Verwandte Themen