On Mon, 2008-02-25 at 20:49 +0100, Lucas Campbell wrote:

> I actually created a helper method that uses url_for to grab the url and 
> find out which subdomain its in and then set the global variable 
> accordingly.
> 
> I can't access helper methods from my controller so I am using my layout 
> to call my helper method which sets the global varialbe.  Only thing is, 
> since i call the helper from my layout, it is being called every time a 
> page is rendered.
> 
> I wanted to find a way to add something in my deploy.rb file to call the 
> helper method once so the global is set.

Ah, I see.  You could do an after :update_code task that appends a
variable declaration to your environment.rb file or puts a file in
shared/system/... hm, I wonder if you could just look at your RAILS_ROOT
from within the app and key off the directory names embedded there?

Yours,

tom


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Deploying Rails" 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-deployment?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to