Displaying 5 results from an estimated 5 matches for "adapter_method".
2006 Aug 13
1
establish_connection method
...else
raise AdapterNotSpecified, "#{spec} database is not
configured"
end
else
spec = spec.symbolize_keys
unless spec.key?(:adapter) then raise AdapterNotSpecified,
"database configuration does not specify adapter" end
adapter_method = "#{spec[:adapter]}_connection"
unless respond_to?(adapter_method) then raise AdapterNotFound,
"database configuration specifies nonexistent #{spec[:adapter]} adapter"
end
remove_connection
establish_connection(ConnectionSpecification.new(spec,...
2006 Jul 24
7
[PATCH] Support for DB Clusters/Replication in ActiveRecord (RFC)
...ecification.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 now
+ # useful in other places.
+ if adapter_method.n...
2008 Apr 11
1
database adaptor password in production.log
...ctions:
{"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 actual database password is in production log.
I''d rather avoid this. Anyone have any ideas for keeping this out of
production.log?
Jonathan
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~-----------...
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