lib/params_filter.rb
def prepare_search_dates
    params[:search] ||= {}
    params[:search][:default_month] = session[:month]
    params[:search][:default_year]  = session[:year]
  end
# Prepares params[:search] to be passed directly to model methods
Prepares params[:search] to be passed directly to model methods
Prepares params [ : search ] to be passed directly to model methods
def prepare_search_dates
    params[:search] ||= {}
    params[:search][:default_month] = session[:month]
    params[:search][:default_year]  = session[:year]
  end
def prepare_search_dates params [ :search ] ||= { } params [ :search ] [ :default_month ] = session [ :month ] params [ :search ] [ :default_year ] = session [ :year ] end
Prepares params[:search] to be passed directly to model methods
Prepares params [ : search ] to be passed directly to model methods