I trying to use render method inside my activeAdmin form method, but after insert render
in code, it stopped to work.
form do |f|
f.inputs I18n.t('sale_header') do
f.input :client
f.input :room
end
f.inputs I18n.t('sale_items') do
render :partial => "form_sale"
end
f.inputs I18n.t('totalization') do
f.input :sub_total, :input_html => { :disabled => :true }
f.input :discount
f.input :total_value, :input_html => { :disabled => :true }
end
f.buttons
end
After insert the render method, only form_sale content is showed on screen.
Any help?
Thank You!
According to the documentation , the right way to customize the form in active_admin is :
and then in your partial “_form.html.erb” you should use formtastic DSL , something like this:
On the web page is clearly stated :
which means , that the DSL of active_admin has some slight limitations .
All my experiments with ‘render’ and ‘form :partial’ has finished with no result . If you’d like to use partial , it should replace all the form .