Sha256: 2d11a2c2e7d28d9b83c97bfe30baa65a3215d5b762db9426bc0b5c5aee1d6817
Contents?: true
Size: 468 Bytes
Versions: 14
Compression:
Stored size: 468 Bytes
Contents
require "typus/orm/mongo/class_methods" class Hit extend Typus::Orm::Mongo::ClassMethods if defined?(Mongoid) include Mongoid::Document field :name field :description validates_presence_of :name validates_uniqueness_of :name else extend ActiveModel::Naming end def self.typus_fields_for(*args) [[:name, :string], [:description, :text]] end def self.model_fields [[:name, :string], [:description, :text]] end end
Version data entries
14 entries across 14 versions & 1 rubygems