Module: Capybara::ActiveAdmin::Finders::Form
- Included in:
- Capybara::ActiveAdmin::Finders
- Defined in:
- lib/capybara/active_admin/finders/form.rb
Overview
Finders for active_admin_form_for and related form components.
Instance Method Summary collapse
- #within_filters { ... } ⇒ Object
- #within_form_for(model_name = nil) { ... } ⇒ Object
- #within_form_has_many(association_name, index: 0) { ... } ⇒ Object
Instance Method Details
#within_filters { ... } ⇒ Object
26 27 28 29 |
# File 'lib/capybara/active_admin/finders/form.rb', line 26 def within_filters selector = filter_form_selector within(selector) { yield } end |
#within_form_for(model_name = nil) { ... } ⇒ Object
10 11 12 13 |
# File 'lib/capybara/active_admin/finders/form.rb', line 10 def within_form_for(model_name = nil) selector = form_selector(model_name) within(selector) { yield } end |
#within_form_has_many(association_name, index: 0) { ... } ⇒ Object
18 19 20 21 22 23 |
# File 'lib/capybara/active_admin/finders/form.rb', line 18 def within_form_has_many(association_name, index: 0) selector = has_many_fields_selector(association_name) fieldset = find_all(selector, minimum: index + 1)[index] within(fieldset) { yield } end |