You can get the domain from the request object, which is available in views/controllers/helpers:
request.domain
Better practice us to set the messages in the controller action, and then just display them in the view, e.g.:
def my_action
@domain_message = get_domain_message(request.domain)
end
def get_domain_message(domain)
case domain
when 'example.com' then 'domain specific message'
when 'egzample.com' then 'another domain specific message'
end
end
Now @domain_message
is available for use in the view.