Sha256: fb9e3fccd4114a39abde68e739dc1c7ec5e9f5e63b116044ba40044d7d654869
Contents?: true
Size: 522 Bytes
Versions: 4
Compression:
Stored size: 522 Bytes
Contents
module Mobility =begin Module loading ActiveRecord-specific classes for Mobility models. =end module ActiveRecord require "mobility/active_record/uniqueness_validator" def self.included(model_class) query_method = Module.new do define_method Mobility.query_method do all end end model_class.extend query_method model_class.const_set(:UniquenessValidator, Class.new(::Mobility::ActiveRecord::UniquenessValidator)) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
mobility-0.3.3 | lib/mobility/active_record.rb |
mobility-0.3.2 | lib/mobility/active_record.rb |
mobility-0.3.1 | lib/mobility/active_record.rb |
mobility-0.3.0 | lib/mobility/active_record.rb |