app/controllers/product_priorities_controller.rb
# Updates a product priority's name
Updates a product priority's name
Updates a product priority ' s name
def update
    product_priority = ProductPriority.find(params[:id])
    unless product_priority.update_attributes(params[:product_priority])
      flash[:error] = "Product priority needs a unique name"
      render :index
      return
    end
    flash[:notice] = t(:settings) + t(:updated)
    redirect_to product_priorities_path
  end
def update product_priority = ProductPriority . find ( params [ :id ] ) unless product_priority . update_attributes ( params [ :product_priority ] ) flash [ :error ] = "Product priority needs a unique name" render :index return end flash [ :notice ] = t ( :settings ) + t ( :updated ) redirect_to product_priorities_path end
Updates a product priority's name
Updates a product priority ' s name