app/controllers/logins_controller.rb
def change_year
    cookies[:year] = { :value => params[:year], :expires => Time.now + 15.minutes }
    referring_page = request.referer
    flash[:notice] = "Year changed to " + " #{params[:year]}"
    if referring_page
      redirect_to referring_page
    else
      redirect_to home_pages_path
    end
  end
# Sets a cookie for the year being viewed / edited by the user. Expires in 15 minutes.
Sets a cookie for the year being viewed / edited by the user. Expires in 15 minutes.
Sets a cookie for the year being viewed / edited by the user . Expires in 15 minutes .
def change_year
    cookies[:year] = { :value => params[:year], :expires => Time.now + 15.minutes }
    referring_page = request.referer
    flash[:notice] = "Year changed to " + " #{params[:year]}"
    if referring_page
      redirect_to referring_page
    else
      redirect_to home_pages_path
    end
  end
def change_year cookies [ :year ] = { :value => params [ :year ] , :expires => Time . now + 15 . minutes } referring_page = request . referer flash [ :notice ] = "Year changed to " + " #{params[:year]}" if referring_page redirect_to referring_page else redirect_to home_pages_path end end
Sets a cookie for the year being viewed / edited by the user.
Sets a cookie for the year being viewed / edited by the user .