Multiple Domains Different Layouts

Hey everyone,
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?

Thanks,

Sean McGilvray

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