lib/merb/orms/rdb4o/connection.rb
# Database connects as soon as the gem is loaded
Database connects as soon as the gem is loaded
Database connects as soon as the gem is loaded
def connect
          if File.exists?(config_file)
            Merb.logger.info!("Connecting to database...")
            ::Rdb4o::Database.setup(config)
          else
            copy_sample_config
            Merb.logger.error! "No database.yml file found in #{Merb.root}/config."
            Merb.logger.error! "A sample file was created called database.sample.yml for you to copy and edit."
            exit(1)
          end
        end
def connect if File . exists? ( config_file ) Merb . logger . info! ( "Connecting to database..." ) :: Rdb4o :: Database . setup ( config ) else copy_sample_config Merb . logger . error! "No database.yml file found in #{Merb.root}/config." Merb . logger . error! "A sample file was created called database.sample.yml for you to copy and edit." exit ( 1 ) end end
Database connects as soon as the gem is loaded
Database connects as soon as the gem is loaded