app/controllers/fiscal_years_controller.rb
def update
    fiscal_year = FiscalYear.find(params[:id])
    unless fiscal_year.update_attributes(params[:fiscal_year])
      flash[:error] = "Fiscal year already exists"
      render :index 
      return
    end
    flash[:notice] = t(:settings) + t(:updated)
    redirect_to fiscal_years_path
  end
# Updates a fiscal year's year or active status
Updates a fiscal year's year or active status
Updates a fiscal year ' s year or active status
def update
    fiscal_year = FiscalYear.find(params[:id])
    unless fiscal_year.update_attributes(params[:fiscal_year])
      flash[:error] = "Fiscal year already exists"
      render :index 
      return
    end
    flash[:notice] = t(:settings) + t(:updated)
    redirect_to fiscal_years_path
  end
def update fiscal_year = FiscalYear . find ( params [ :id ] ) unless fiscal_year . update_attributes ( params [ :fiscal_year ] ) flash [ :error ] = "Fiscal year already exists" render :index return end flash [ :notice ] = t ( :settings ) + t ( :updated ) redirect_to fiscal_years_path end
Updates a fiscal year's year or active status
Updates a fiscal year ' s year or active status