Sha256: 9c4a6ff43f97f4617a4836c348184bda5dc73c9fa64c813db6a52d013ed0960a

Contents?: true

Size: 652 Bytes

Versions: 9

Compression:

Stored size: 652 Bytes

Contents

require 'mongo_mapper'


[
  'fixes',
  'migration',
  'mongo_mapper',
  'view_helpers',
  'db_config',
  'micelaneous',
  
  'plugins/default_scope',
  'plugins/attributes_cache',
  'plugins/micelaneous',  
].each do |file|
  require "#{File.dirname __FILE__}/mongo_mapper_ext/#{file}"
end

module CommonPluginsAddition
  def self.included(model)
    model.plugin MongoMapper::Plugins::DefaultScope
    model.plugin MongoMapper::Plugins::AttributesCache
    model.plugin MongoMapper::Plugins::Micelaneous
    
    model.attr_protected :id, :_id, :_type, :created_at, :updated_at
  end
end
MongoMapper::Document.append_inclusions(CommonPluginsAddition)

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rails-ext-0.3.15 lib/mongo_mapper_ext.rb
rails-ext-0.3.14 lib/mongo_mapper_ext.rb
rails-ext-0.3.13 lib/mongo_mapper_ext.rb
rails-ext-0.3.12 lib/mongo_mapper_ext.rb
rails-ext-0.3.11 lib/mongo_mapper_ext.rb
rails-ext-0.3.10 lib/mongo_mapper_ext.rb
rails-ext-0.3.9 lib/mongo_mapper_ext.rb
rails-ext-0.3.8 lib/mongo_mapper_ext.rb
rails-ext-0.3.6 lib/mongo_mapper_ext.rb