provideal / tabulatr

A tight DSL to build tables of ActiveRecord or Mongoid models with sorting, pagination, finding/filtering, selecting and batch actions. Tries to do for tables what formtastic and simple_form did for forms.
Other
160 stars 15 forks source link

New item helper that knows about filters #7

Open dgm opened 13 years ago

dgm commented 13 years ago

When a filter is in effect, it would be nice to have a helper that knows about the filter params, such that the filter is passed into the new form. the new form controller could then parse the filter params and initialize any fields to match the filter. Related to the example in issue #6, this would mean that if a filter was set on the transaction_type column with a value of "cash", clicking a "new transaction" link would go to a form with the transaction type already set to "cash"

dgm commented 13 years ago

Something like:

<%= link_to_with_filter(label, path, options) %>