I am implementing ActiveAdmin and would like to use the :date_range filter type on my Job table's date column. According to the documentation this just needs to be set as filter [:attr], :as => :date_range. When I use this code I get the following error:
undefined method `when_datetime_gte' for #<MetaSearch::Searches::Job:0xda5b68c>
Searching this error in Google produces absolutely nothing! I am using version 0.6.3 of ActiveAdmin and have gem "meta_search", '>= 1.1.0.pre' for MetaSearch in my Gemfile per the ActiveAdmin docs.
Any idea what's going on??
If your model/resource includes a date attribute (when_datetime), you only need to add the following snippet of code to your page:
if the
when_datetimehas a date type, the filter is going to be adate_rangeby default.