Method: Datagrid::Helper#datagrid_form_with
- Defined in:
- lib/datagrid/helper.rb
#datagrid_form_with(**options) ⇒ String
Renders HTML for grid with all filters inputs and labels defined in it
369 370 371 372 373 374 375 376 |
# File 'lib/datagrid/helper.rb', line 369 def datagrid_form_with(**) raise ArgumentError, "datagrid_form_with block argument is invalid. Use form_with instead." if block_given? grid = [:model] raise ArgumentError, "Grid has no available filters" if grid&.filters&.empty? _render_partial("form", [:partials], { grid: [:model], options: }) end |