You can extract the domain type from the request object (use request.domain and split on the period to get the last element)
I probably wouldn't write different controllers if the differences are minor. If there is the need for multiple controllers, there's probably still one controller you initially interface to which can change what it does based on the domain type (that is you pass the domain type to the controller and let it make conditional decisions -- which might be factory pattern to launch a controller you describe above).
You might find some useful thoughts here: http://www.railsdev.ws/blog/10/using-subdomains-in-rails-apps/