app/controllers/application_controller.rb
def load_current_fiscal_year
      @current_fiscal_year = AppSetting.current_fiscal_year
      if @current_fiscal_year.nil?
        @current_fiscal_year = FiscalYear.order(:updated_at).last
        AppSetting.find_by_code("current_fiscal_year").update_attributes(
            :value => @current_fiscal_year.year)
      end
    end
# Loads the current fiscal year. If the current fiscal year does not exist (meaning it has been 
# deleted on accident) then the application creates a new one based off of the currently set
# fiscal year value.
Loads the current fiscal year. If the current fiscal year does not exist (meaning it has been
deleted on accident) then the application creates a new one based off of the currently set
fiscal year value.
Loads the current fiscal year . If the current fiscal year does not exist ( meaning it has been deleted on accident ) then the application creates a new one based off of the currently set fiscal year value .
def load_current_fiscal_year
      @current_fiscal_year = AppSetting.current_fiscal_year
      if @current_fiscal_year.nil?
        @current_fiscal_year = FiscalYear.order(:updated_at).last
        AppSetting.find_by_code("current_fiscal_year").update_attributes(
            :value => @current_fiscal_year.year)
      end
    end
def load_current_fiscal_year @current_fiscal_year = AppSetting . current_fiscal_year if @current_fiscal_year . nil? @current_fiscal_year = FiscalYear . order ( :updated_at ) . last AppSetting . find_by_code ( "current_fiscal_year" ) . update_attributes ( :value => @current_fiscal_year . year ) end end
Loads the current fiscal year.
Loads the current fiscal year .