Hi Colin,

I wasn't able to find any exception referring to this specific line code.
But, in case of an exception, Rails would return a 500 error page and not 
the correct page with someone else records. Am I right?

Best regards

Em quarta-feira, 20 de novembro de 2013 14h58min40s UTC-2, Colin Law 
escreveu:
>
> On 20 November 2013 16:52, Paulo Henrique Leite de Castro 
> <[email protected] <javascript:>> wrote: 
> > Hi Fred, thanks for your reply! 
> > 
> > I'm using authlogic gem to authenticate my users. 
> > 
> > Inside my Application Controller I created the following code: 
> > 
> > prepend_before_filter :database_connection 
> > 
> > and this method has the following code: 
> > 
> > ActiveRecord::Base.establish_connection({:adapter => "mysql", :database 
> => 
> > "#{current_user.dbname}", :username => "x", :password => "x", :host => 
> "x", 
> > :encoding => "utf8"}) 
>
> Are you checking for an error return here in case it fails for some 
> reason, leaving the connection as it was for the last request?  Also I 
> presume you are not silently absorbing any exception raised there. 
>
> 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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/938a8490-5894-4ef7-94e5-ca1fbbc866bc%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to