r2 - 02 Sep 2007 - 14:42:07 - HecPeAreYou are here: TWiki >  Rails Web > ShareSession
Related: OpenIdAuthenticationPlugin
http://www.pjhyett.com/posts/186-rails-interacting-with-an-external-database

class MyModel < ActiveRecord::Base
  self.connection = "name_in_database_yml" 
end

En association.rb, nonce.rb y settings.rb (vendor/plugins/op../lib/op../) añadimos:

self.connection = "name_in_database_yml" 

Creamos otro... en database.yml:

name_in_database_yml:
  adapter: ...
  database: ...
  username: ...
  password: ...
  socket: ...

Aún falta migrations...

mysqldump -uUSUARIO -pCONTRASEÑA --opt openid_development open_id_authentication_associations open_id_authentication_nonces open_id_authentication_settings > pr_od.sql

mysql -uUSUARIO -pCONTRASEÑA openid_development_s < pr_od.sql 

-- HecPeAre - 02 Sep 2007

Topic attachments
I Attachment Action Size Date Who Comment
elserb 002_add_open_id_authentication_tables.rb manage 0.8 K 02 Sep 2007 - 14:36 HecPeAre  
elsesql pr_od.sql manage 3.2 K 02 Sep 2007 - 14:34 HecPeAre  
Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r2 < r1 | More topic actions
 
Powered by TWiki

This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback