app/models/fiscal_year.rb
def change_active_fiscal_year
    return true if self.active
    if AppSetting.current_fiscal_year == self
      AppSetting.find_by_code("current_fiscal_year").update_attributes(:value => FiscalYear.active_fiscal_years.first.year)
    end
  end
# Changes the current fiscal yaer if the current year was set to inactive and was the current year
Changes the current fiscal yaer if the current year was set to inactive and was the current year
Changes the current fiscal yaer if the current year was set to inactive and was the current year
def change_active_fiscal_year
    return true if self.active
    if AppSetting.current_fiscal_year == self
      AppSetting.find_by_code("current_fiscal_year").update_attributes(:value => FiscalYear.active_fiscal_years.first.year)
    end
  end
def change_active_fiscal_year return true if self . active if AppSetting . current_fiscal_year == self AppSetting . find_by_code ( "current_fiscal_year" ) . update_attributes ( :value => FiscalYear . active_fiscal_years . first . year ) end end
Changes the current fiscal yaer if the current year was set to inactive and was the current year
Changes the current fiscal yaer if the current year was set to inactive and was the current year