This is how you can get the info from an activerecord object, if
you're not using active record or if you're using a custom made
solution it obviously won't work.

-
Maurício Linhares
http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr



On Tue, Jun 9, 2009 at 12:26 PM, Steve
Dc<[email protected]> wrote:
>
> Maurício Linhares wrote:
>> YourActiveRecordModel.configurations[ Rails.env ][ 'username' ]
>> YourActiveRecordModel.configurations[ Rails.env ][ 'database' ]
>>
>> -
>> Maur�cio Linhares
>> http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr
>>
>>
>>
>> On Tue, Jun 9, 2009 at 11:14 AM, Steve
>
> Thanks for your suggestion. However I am spcifying a dsn which includes
> Username, and database. This approach has a couple of issues.
>
> 1. The user may be logging in using Windows authentication. In that case
> database.yml will not have a value for User field.
> 2. What if the application changes connection after starting up?
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to