search for: connectionspecif

Displaying 8 results from an estimated 8 matches for "connectionspecif".

Did you mean: connectionspec
2006 Aug 13
1
establish_connection method
...d::base source code which is connection_specification.rb. In the body of establish_connection method, def self.establish_connection(spec = nil) case spec when nil raise AdapterNotSpecified unless defined? RAILS_ENV establish_connection(RAILS_ENV) when ConnectionSpecification clear_active_connection_name @active_connection_name = name @@defined_connections[name] = spec when Symbol, String if configuration = configurations[spec.to_s] establish_connection(configuration) else raise Ada...
2006 Jan 18
1
Helps!!!!! Rails database connection guru needed!!!!!!!
...e tests lead us to some important questions that we did find the answer from the documentation, So we hope the communauty can help us to answer those questions!!!!! Question A- How rails disconnect the connection? As we can see in the source code : Call stack for postgresql 1- any controller 2- connectionspecification.establish_connection 3- ActiveRecord::base.postgresql_connection(config) 4- ConnectionAdapters::PostgreSQLAdapter.new( PGconn.connect(), logger ) 5- connection_specification.establish_connection @@defined_connections[self] = spec The connection is made while Rails calls PGconn.connect(), t...
2008 Apr 11
1
database adaptor password in production.log
...igated it and it''s working for me, that''s not what this question is about). So this didn''t used to happen. But now, for some reason, the production log begins with: allow_concurrency=true Defined connections: {"ActiveRecord::Base"=>#<ActiveRecord::Base::ConnectionSpecification:0xb6b52924 @config={:port=>XXXX, :username=>"XXXXXX", :database=>"XXXX", :password=>"XXXX", :adapter=>"mysql", :host=>"xxx.xxx.jhu.edu"}, @adapter_method="mysql_connection">} Except with the X''s. My a...
2006 Jul 24
7
[PATCH] Support for DB Clusters/Replication in ActiveRecord (RFC)
...=============== --- connection_adapters/abstract/connection_specification.rb (revision 4617) +++ connection_adapters/abstract/connection_specification.rb (working copy) @@ -1,10 +1,21 @@ require ''set'' +require ''pp'' module ActiveRecord class Base class ConnectionSpecification #:nodoc: attr_reader :config, :adapter_method - def initialize (config, adapter_method) + def initialize (config, adapter_method = nil) + # If no adapter is found, try to devine it from the config. + # This was moved here from establish_connection since it''s n...
2006 Jan 05
7
HOWTO: Combine fields from 2 two tables in 1 object
Hi all, For a dropdownlist (showing "Company - FirstName Lastname'') I want to fill an object @project_contacts with "Name" from table Companies and "Firstname" and "Lastname" from table contacts. Any idea? Regards, Gerard. -- "Who cares if it doesn''t do anything? It was made with our new Triple-Iso-Bifurcated-Krypton-Gate-MOS
2012 Jul 17
6
Database connection parameters are tied to the filesystem
HI Guys, I recently tried VERY hard to override the database configuration bassed on ENV vars or actual API calls. This task is almost next to impossible. I know that the database.yml file is parsed as ERB but that is sane for simple ENV replacement if you want to actually change which database adaptor it is (requires extra config/params) it becomes messy. I found
2007 Jan 11
12
Rails not properly handling Oracle db connections/sesions in dev mode
We are running edge rails with oracle. After a few hundred requests all available sesions are used up. It seems prior connections are being left open. When this happens no one using the installation of Oracle can create a new session until you kill your mongrel/webrick server. Patch #6928 addresses this problem, and i applied it to my vendor rails and it worked. I think, if possible, this
2006 May 10
8
dynamic setting of username and password in database.yml
Hello I''ve now read a lot about application-level authentication in Rails, but I need to do database-level authentication. The reason is that my database needs to have the current_user (database current_user, not current_user defined in an ActiveRecord Model) set to execute triggers for automatically updating audit tables. So it is not enough to have a session check against a User