Module: Adminterface::Extensions::Views::ActiveAdminForm
- Defined in:
- lib/adminterface/extensions/views/components/active_admin_form.rb
Instance Method Summary collapse
- #action(method, options = {}) ⇒ Object
- #cancel_link(url = {action: "index"}, html_options = {class: form_css_classes.dig(:actions, :cancel)}, li_attrs = {}) ⇒ Object
- #input ⇒ Object
Instance Method Details
#action(method, options = {}) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/adminterface/extensions/views/components/active_admin_form.rb', line 13 def action(method, = {}) if method.eql?(:submit) .reverse_merge!(button_html: {class: form_css_classes.dig(:actions, :submit)}) end super(method, ) end |
#cancel_link(url = {action: "index"}, html_options = {class: form_css_classes.dig(:actions, :cancel)}, li_attrs = {}) ⇒ Object
21 22 23 |
# File 'lib/adminterface/extensions/views/components/active_admin_form.rb', line 21 def cancel_link(url = {action: "index"}, = {class: form_css_classes.dig(:actions, :cancel)}, li_attrs = {}) super(url, , li_attrs) end |
#input ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/adminterface/extensions/views/components/active_admin_form.rb', line 5 def input(...) default_field_error_proc = ::ActionView::Base.field_error_proc ::ActionView::Base.field_error_proc = proc { |html_tag, _instance_tag| html_tag } super ensure ::ActionView::Base.field_error_proc = default_field_error_proc end |