class ArDocStore::Attributes::Datetime

Public Instance Methods

attribute_type() click to toggle source
# File lib/ar_doc_store/attributes/datetime.rb, line 18
def attribute_type
  ActiveRecord::Type::DateTime
end
define_query_method() click to toggle source
# File lib/ar_doc_store/attributes/datetime.rb, line 6
      def define_query_method
        model.class_eval <<-CODE, __FILE__, __LINE__ + 1
          def #{attribute}?
            #{attribute}.present?
          end
        CODE
      end
type() click to toggle source
# File lib/ar_doc_store/attributes/datetime.rb, line 14
def type
  :datetime
end