app/models/product.rb
# Returns the name of the product state if the product state isn't nil
Returns the name of the product state if the product state isn't nil
Returns the name of the product state if the product state isn ' t nil
def priority
    unless self.product_priority.nil?
      return self.product_priority.name
    end
  end
def priority unless self . product_priority . nil? return self . product_priority . name end end
Returns the name of the product state if the product state isn't nil
Returns the name of the product state if the product state isn ' t nil