Sha256: 56be4c19daad37e9604f257f11c3e551ebb09f6fb6d764bd5f5ffb615aedd2ca

Contents?: true

Size: 560 Bytes

Versions: 6

Compression:

Stored size: 560 Bytes

Contents

# use database config if provided
if rad.models.config
  b = lambda do
    Mongoid.configure do |config|  
      config.logger = rad.logger
    end
    Mongoid.from_hash rad.models.config
  end

  # hiding MongoDB connecting messages
  rad.logger.respond_to?(:silence) ? rad.logger.silence(&b) : b.call
end


%w(
  micelaneous
  role      
  authorized
  authorized_object
  file_uploader
  attachments_uploader_helper
  attachment_uploader
).each{|n| require "kit/models/#{n}"}

Mongoid::Document.class_eval do
  include Mongoid::AttachmentsUploaderHelper
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rad_kit-0.0.6 lib/kit/models_after.rb
rad_kit-0.0.5 lib/kit/models_after.rb
rad_kit-0.0.4 lib/kit/models_after.rb
rad_kit-0.0.3 lib/kit/models_after.rb
rad_kit-0.0.2 lib/kit/models_after.rb
rad_kit-0.0.1 lib/kit/models_after.rb