def attribute_present?(attribute)
      value = read_attribute(attribute)
      !value.nil? && !(value.respond_to?(:empty?) && value.empty?)
    end
def attribute_present?(attribute)
      value = read_attribute(attribute)
      !value.nil? && !(value.respond_to?(:empty?) && value.empty?)
    end
Returns +true+ if the specified +attribute+ has been set and is neither +nil+ nor <tt>empty?</tt> (the latter only applies
 to objects that respond to <tt>empty?</tt>, most notably Strings). Otherwise, +false+.
 Note that it always returns +true+ with boolean attributes.

   person = Task.new(title: '', is_done: false)
   person.attribute_present?(:title)   # => false
   person.attribute_present?(:is_done) # => true
   person.name = 'Francesco'
   person.is_done = true
   person.attribute_present?(:title)   # => true
   person.attribute_present?(:is_done) # => true