app/models/concerns/errorable.rb
def property_required?( property )

      self.validators_on( property ).map( &:class ).include?( ActiveRecord::Validations::PresenceValidator )

    end
# Returns whether or not a property on this class is required.
Returns whether or not a property on this class is required.
Returns whether or not a property on this class is required .
def property_required?( property )
      self.validators_on( property ).map( &:class ).include?( ActiveRecord::Validations::PresenceValidator )
    end
def property_required? ( property ) self . validators_on ( property ) . map ( & :class ) . include? ( ActiveRecord :: Validations :: PresenceValidator ) end
Returns whether or not a property on this class is required.
Returns whether or not a property on this class is required .
property