I’m going out on a limb here but I’d use
layout “x” if request.domain == “domain-one.com” layout “y” if request.domain == " domain-two.com"
for the layouts. (You may choose to use an if/else/end style.) For the views on each method you’ll have to call
def some_method
Code missing…
render :template => “blah/blah/blah” if request.domain == “domain-one.com” render :template => “bleh/bleh/bleh” if request.domain == “domain-two.com”
end
or something. I would personally try to find a way to abstract that out as a filter on the actions. Something like
after_filter :map_to_view_by_domain
private
def map_to_view_by_domain case request.domain when “domain-one.com” render :template => “blah/blah/#{action_name}” when “domain-two.com” render :template => “bleh/bleh/#{action_name}” end end
I’m not saying that’s valid code or anything but a rough idea. I think it should work but you’ll have to tool around with it. I’m currently logged into Windows [dual boot] and don’t have access to Ruby/Rails. I hope that works. Or at least puts you on the right track.
RS: