app/models/quarter.rb
def prev
    prev_qtr_code = quarter_code_id == 1 ? 4 : quarter_code_id - 1
    prev_year = quarter_code_id == 1 ? year - 1 : year
    Quarter.find_easily(prev_qtr_code, prev_year)
  end
# Determines the previous Quarter in the calendar
Determines the previous Quarter in the calendar
Determines the previous Quarter in the calendar
def prev
    prev_qtr_code = quarter_code_id == 1 ? 4 : quarter_code_id - 1
    prev_year = quarter_code_id == 1 ? year - 1 : year
    Quarter.find_easily(prev_qtr_code, prev_year)
  end
def prev prev_qtr_code = quarter_code_id == 1 ? 4 : quarter_code_id - 1 prev_year = quarter_code_id == 1 ? year - 1 : year Quarter . find_easily ( prev_qtr_code , prev_year ) end
Determines the previous Quarter in the calendar
Determines the previous Quarter in the calendar