Sha256: 7b46ce6c9f4065e3efb7801ed9036102b186cbebc1ba76c220f6f0c7de34362f
Contents?: true
Size: 439 Bytes
Versions: 10
Compression:
Stored size: 439 Bytes
Contents
module Noodall module Indexer def self.configure(model) model.class_eval do cattr_accessor :indexes end model.indexes = [] end module ClassMethods def ensure_index(*args) indexes << args end def create_indexes! indexes.each do |args| puts "Creating index #{args.inspect}" collection.create_index(*args) end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems