@@ -2,9 +2,7 @@ class StateFile::FaqController < ApplicationController
22 layout "state_file"
33
44 def index
5- years_to_show = filing_years_to_show # calculate once per request
65 visible_state_code_names = StateFile ::StateInformationService . state_code_to_name_map
7- . filter { |state_code , _ | ( years_to_show - StateFile ::StateInformationService . filing_years ( state_code ) ) . empty? }
86 . transform_values { |state_name | { state_name : } }
97 visible_state_code_names . slice! ( params [ :us_state ] ) unless params [ :us_state ] == "us"
108 product_types = visible_state_code_names . keys . map do |code |
@@ -20,10 +18,6 @@ def index
2018 end
2119
2220 def show
23- if params [ :us_state ] == 'ny'
24- redirect_to state_landing_page_path ( us_state : "ny" )
25- return
26- end
2721 @section_key = params [ :section_key ]
2822 @faq_category = FaqCategory . find_by ( slug : @section_key , product_type : FaqCategory . state_to_product_type ( params [ :us_state ] ) )
2923
@@ -32,6 +26,7 @@ def show
3226
3327 private
3428
29+ # @deprecated FYST is retired now, show all categories all the time!
3530 def filing_years_to_show
3631 faq_show_start = Rails . configuration . state_file_show_faq_date_start
3732 faq_show_end = Rails . configuration . state_file_show_faq_date_end
@@ -48,12 +43,10 @@ def filing_years_to_show
4843 # show states that were open this year and will open next year
4944 [ tax_year , tax_year + 1 ]
5045 end
46+ elsif app_time > faq_show_end
47+ [ tax_year + 1 ]
5148 else
52- if app_time > faq_show_end
53- [ tax_year + 1 ]
54- else
55- [ tax_year ]
56- end
49+ [ tax_year ]
5750 end
5851 end
5952end
0 commit comments