Top Level Namespace
Defined Under Namespace
Modules: RubyOpengeodb Classes: Changelog, Coordinates, Location, Textdata, Typename
Instance Method Summary collapse
Instance Method Details
#activerecord_connect(adapter = "mysql", host = "localhost", username = "root", password = nil, database = "opengeodb", socket = "/var/run/mysqld/mysqld.sock") ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ruby-opengeodb/opengeodb_connect.rb', line 4 def activerecord_connect(adapter="mysql", host="localhost", username="root", password=nil, database="opengeodb", socket="/var/run/mysqld/mysqld.sock") if password ActiveRecord::Base.establish_connection(:adapter => adapter, :host => host, :username => username, :database => database, :socket => socket) else ActiveRecord::Base.establish_connection(:adapter => adapter, :host => host, :username => username, :password => password, :database => database, :socket => socket) end end |