I have an ActiveAdmin class which has a date_range filter as
filter :creation_time
having a start date and end date calender input. I want to add default range i.e. from today's date to tomorrow's date when the dashboard is loaded for the first time. So I tried to do like this :
before_filter only: [:index] do
params[:q] = {creation_time: Date.today..Date.tomorrow} if params[:commit].blank?
end
But this is not working. How to add default date range here?