On 20 November 2013 17:40, Paulo Castro wrote:
Hi Colin

first of all, thank you very much for your help!! You found the root cause
of my problem.

After user session expired, the code:

ActiveRecord::Base.establish_connection({:adapter => "mysql", :database =>
"#{current_user.dbname}", :username => "x", :password => "x", :host => "x",
:encoding => "utf8"})

didn't work, but also didn't throw any exception.
I expect it returned an error (hence my suggestion to check for error
return). If you look at the docs for establish_connection you will
see that it may throw an exception, but under other circumstances will
return an error.

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsydFpFS%2BGLWveyf9vroY%2BoHf3BYS1%2BE7iMaSn2mBay%2Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 10 of 11 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedNov 20, '13 at 7:11a
activeNov 21, '13 at 9:34a
posts11
users5
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase