def orm_configure!
      return if orm == :active_record
      debug! "Configuring orm: [#{orm}]"
      
      if !devise_initializer?        
        say "WARNING: initializer/devise.rb not found", :yellow
        return
      end
        
      if !has_statement?(orm_replacement)
        debug! "require 'devise/orm/#{orm}' already in devise.rb initializer"
        return
      end

      if !has_devise_orm_statement?
        say "WARNING: devise/orm statement not found in devise.rb initializer", :yellow
        return
      end
      
      replace_initializer_content :devise,  :where => orm_statement, :with => orm_replacement
    end
def orm_configure!
      return if orm == :active_record
      debug! "Configuring orm: [#{orm}]"
      
      if !devise_initializer?        
        say "WARNING: initializer/devise.rb not found", :yellow
        return
      end
        
      if !has_statement?(orm_replacement)
        debug! "require 'devise/orm/#{orm}' already in devise.rb initializer"
        return
      end

      if !has_devise_orm_statement?
        say "WARNING: devise/orm statement not found in devise.rb initializer", :yellow
        return
      end
      
      replace_initializer_content :devise,  :where => orm_statement, :with => orm_replacement
    end
def protection_configure!
   debug! "Configuring: devise authentication filter"
   ## Add Devise protection to Application controller:
   insert_into_controller :application do
     "before_filter :authenticate_user!"
   end
 end
 inside 'config/initializers/devise.rb' change to:
 require 'devise/orm/mongo_mapper'