app/views/admin/badges/_form.html.arb
# frozen_string_literal: true
active_admin_form_for [:admin, resource] do |f|
f.inputs 'Фан-ран награда' do
input :name
input :received_date, required: true if f.object.funrun_kind?
input :conditions, as: :quill_editor,
required: true,
input_html: {
data: {
options: {
modules: {
toolbar: [
%w[bold italic strike],
%w[blockquote code-block],
[{ list: 'ordered' }, { list: 'bullet' }],
['link'],
['clean']
],
},
placeholder: 'Необходимо очень постараться...',
theme: 'snow',
},
},
}
input :image, as: :file, input_html: { accept: 'image/png' }, required: true if f.object.funrun_kind?
end
f.actions
end