patricklindsay / wice_grid

A Rails grid plugin to create grids with sorting, pagination, and (automatically generated) filters
http://wicegrid.herokuapp.com/
MIT License
33 stars 29 forks source link

Add new option filter_control_options #18

Closed JasonBarnabe closed 6 years ago

JasonBarnabe commented 6 years ago

Pass filter_control_options to the filter controls. Add support for start_year, end_year, max_year_allowed passed to rails_datetime_helper. This is required to fix a test that failed because the text wanted to filter on year 2011 but by default the options went to current year - 5

patricklindsay commented 6 years ago

Great! I'll merge this but..

Ideally here I'd like to see a spec to test the default. If this fixes a test which was looking for 2011 how about a test which tested behaviour when no filter control options are passed in.