Sha256: c3179700a8f0220b6cddf6dce2c8e4f690661a90db47839f8614daf94790842f

Contents?: true

Size: 635 Bytes

Versions: 9

Compression:

Stored size: 635 Bytes

Contents

require 'mongo_mapper'


[
  'fixes',
  'migration',
  'mongo_mapper',
  'view_helpers',
  'db_config',
  
  '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.5 lib/mongo_mapper_ext.rb
rails-ext-0.3.4 lib/mongo_mapper_ext.rb
rails-ext-0.3.3 lib/mongo_mapper_ext.rb
rails-ext-0.3.2 lib/mongo_mapper_ext.rb
rails-ext-0.3.1 lib/mongo_mapper_ext.rb
rails-ext-0.3 lib/mongo_mapper_ext.rb
rails-ext-0.2.21 lib/mongo_mapper_ext.rb
rails-ext-0.2.20 lib/mongo_mapper_ext.rb
rails-ext-0.2.19 lib/mongo_mapper_ext.rb