On Wed, Oct 7, 2009 at 12:02 PM, Sean McGilvray
<smcgilvray-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> How do I do a before_filter @request.env[''HOST''] =
"somesite.com" and
> tell it to display a different layout based on the requested domain?
In your controller..
:layout => :calculate_layout
private
def calculate_layout
request.env[''HOST''] == "somesite.com" ? :foo :
:bar
end
http://api.rubyonrails.org/classes/ActionController/Layout/ClassMethods.html
--
Greg Donald
http://destiney.com/